Skip to content

Commit

Permalink
Split ShotoverNode::address into address_for_peers and address_for_cl…
Browse files Browse the repository at this point in the history
…ient
  • Loading branch information
rukai committed Oct 21, 2024
1 parent f327c96 commit 00cd7cd
Show file tree
Hide file tree
Showing 25 changed files with 121 additions and 63 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This assists us in knowing when to make the next release a breaking release and
### topology.yaml

* A new mandatory configuration `check_shotover_peers_delay_ms` is added for `KafkaSinkCluster`. See [transform.md](docs/src/transforms.md) for details on this configuration.
* The `address` field for each shotover node in `KafkaSinkCluster` is replaced with `address_for_clients` and `address_for_peers`. See [transform.md](docs/src/transforms.md) for details on these fields.

## 0.4.0

Expand Down
10 changes: 7 additions & 3 deletions docs/src/transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,14 @@ If SCRAM authentication against the first kafka broker fails, shotover will term
# A list of every Shotover node that will be proxying to the same kafka cluster.
# This field should be identical for all Shotover nodes proxying to the same kafka cluster.
shotover_nodes:
# Address of the Shotover node.
# Address of the Shotover node that is reported to the kafka clients.
# This is usually the same address as the Shotover source that is connected to this sink.
# But it may be different if you want Shotover to report a different address.
- address: "127.0.0.1:9092"
# But it may be different if you want Shotover to report a different address to its clients.
- address_for_client: "127.0.0.1:9092"
# Address of the shotover node as used to check for peers that are up.
# This is usually the same address as the Shotover source that is connected to this sink.
# But it may be different if you want Shotover to connect to its peers via a different address.
address_for_peers: "127.0.0.1:9092"
# The rack the Shotover node will report as and route messages to.
# For performance reasons, the Shotover node should be physically located in this rack.
rack: "rack0"
Expand Down
3 changes: 2 additions & 1 deletion shotover-proxy/benches/windsock/kafka/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ impl KafkaBench {
check_shotover_peers_delay_ms: Some(3000),
first_contact_points: vec![kafka_address],
shotover_nodes: vec![ShotoverNodeConfig {
address: host_address.parse().unwrap(),
address_for_clients: host_address.parse().unwrap(),
address_for_peers: host_address.parse().unwrap(),
rack: "rack1".into(),
broker_id: 0,
}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 0
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "localhost:9191"
- address_for_peers: "localhost:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack1"
broker_id: 0
- address: "localhost:9192"
- address_for_peers: "localhost:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack2"
broker_id: 1
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "localhost:9191"
- address_for_peers: "localhost:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack1"
broker_id: 0
- address: "localhost:9192"
- address_for_peers: "localhost:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack2"
broker_id: 1
local_shotover_broker_id: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "localhost:9191"
- address_for_peers: "localhost:9191"
address_for_clients: "localhost:9191"
rack: "rack1"
broker_id: 0
- address: "localhost:9192"
- address_for_peers: "localhost:9192"
address_for_clients: "localhost:9192"
rack: "rack2"
broker_id: 1
- address: "localhost:9193"
- address_for_peers: "localhost:9193"
address_for_clients: "localhost:9193"
rack: "rack3"
broker_id: 2
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "localhost:9191"
- address_for_peers: "localhost:9191"
address_for_clients: "localhost:9191"
rack: "rack1"
broker_id: 0
- address: "localhost:9192"
- address_for_peers: "localhost:9192"
address_for_clients: "localhost:9192"
rack: "rack2"
broker_id: 1
- address: "localhost:9193"
- address_for_peers: "localhost:9193"
address_for_clients: "localhost:9193"
rack: "rack3"
broker_id: 2
local_shotover_broker_id: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "localhost:9191"
- address_for_peers: "localhost:9191"
address_for_clients: "localhost:9191"
rack: "rack1"
broker_id: 0
- address: "localhost:9192"
- address_for_peers: "localhost:9192"
address_for_clients: "localhost:9192"
rack: "rack2"
broker_id: 1
- address: "localhost:9193"
- address_for_peers: "localhost:9193"
address_for_clients: "localhost:9193"
rack: "rack3"
broker_id: 2
local_shotover_broker_id: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9192"
- address_for_peers: "localhost:9192"
address_for_clients: "localhost:9192"
rack: "rack0"
broker_id: 0
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 0
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 0
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9191"
- address_for_peers: "127.0.0.1:9191"
address_for_clients: "127.0.0.1:9191"
rack: "rack0"
broker_id: 0
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 1
- address: "127.0.0.1:9193"
- address_for_peers: "127.0.0.1:9193"
address_for_clients: "127.0.0.1:9193"
rack: "rack0"
broker_id: 2
local_shotover_broker_id: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 0
local_shotover_broker_id: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ sources:
chain:
- KafkaSinkCluster:
shotover_nodes:
- address: "127.0.0.1:9192"
- address_for_peers: "127.0.0.1:9192"
address_for_clients: "127.0.0.1:9192"
rack: "rack0"
broker_id: 0
local_shotover_broker_id: 0
Expand Down
Loading

0 comments on commit 00cd7cd

Please sign in to comment.