-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
360 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
--- | ||
sources: | ||
cassandra_prod: | ||
Cassandra: | ||
- Cassandra: | ||
name: cassandra | ||
listen_addr: "0.0.0.0:9043" | ||
chain_config: | ||
main_chain: | ||
- CassandraPeersRewrite: | ||
port: 9043 | ||
- CassandraSinkSingle: | ||
remote_address: "127.0.0.1:9042" | ||
connect_timeout_ms: 3000 | ||
source_to_chain_mapping: | ||
cassandra_prod: main_chain | ||
chain: | ||
- CassandraPeersRewrite: | ||
port: 9043 | ||
- CassandraSinkSingle: | ||
remote_address: "127.0.0.1:9042" | ||
connect_timeout_ms: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
--- | ||
sources: | ||
cassandra_prod: | ||
Cassandra: | ||
- Cassandra: | ||
name: cassandra | ||
listen_addr: "0.0.0.0:9042" | ||
chain_config: | ||
main_chain: | ||
- CassandraSinkCluster: | ||
first_contact_points: ["172.16.1.2:9042", "172.16.1.3:9042"] | ||
local_shotover_host_id: "2dd022d6-2937-4754-89d6-02d2933a8f7a" | ||
shotover_nodes: | ||
- address: "172.16.1.5:9042" | ||
data_center: "dc1" | ||
rack: "rack1" | ||
host_id: "2dd022d6-2937-4754-89d6-02d2933a8f7a" | ||
connect_timeout_ms: 3000 | ||
|
||
source_to_chain_mapping: | ||
cassandra_prod: main_chain | ||
chain: | ||
- CassandraSinkCluster: | ||
first_contact_points: ["172.16.1.2:9042", "172.16.1.3:9042"] | ||
local_shotover_host_id: "2dd022d6-2937-4754-89d6-02d2933a8f7a" | ||
shotover_nodes: | ||
- address: "172.16.1.5:9042" | ||
data_center: "dc1" | ||
rack: "rack1" | ||
host_id: "2dd022d6-2937-4754-89d6-02d2933a8f7a" | ||
connect_timeout_ms: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
main_log_level: "info,shotover_proxy=info" | ||
observability_interface: "0.0.0.0:9001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
version: '3.3' | ||
services: | ||
redis-node-primary-0: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.10 | ||
environment: &environment_primary | ||
- 'ALLOW_EMPTY_PASSWORD=yes' | ||
- 'REDIS_NODES=redis-node-primary-0 redis-node-primary-1 redis-node-primary-2' | ||
healthcheck: | ||
&healthcheck_primary | ||
test: | ||
[ | ||
"CMD-SHELL", | ||
"OUT=`redis-cli cluster slots`; | ||
echo $$OUT | grep 172.16.1.10 || exit 1; | ||
echo $$OUT | grep 172.16.1.11 || exit 1; | ||
echo $$OUT | grep 172.16.1.12 || exit 1; | ||
echo $$OUT | grep 172.16.1.13 || exit 1; | ||
echo $$OUT | grep 172.16.1.14 || exit 1; | ||
echo $$OUT | grep 172.16.1.15 || exit 1;" | ||
] | ||
interval: 1s | ||
timeout: 3s | ||
retries: 30 | ||
|
||
redis-node-primary-1: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.11 | ||
environment: *environment_primary | ||
healthcheck: *healthcheck_primary | ||
|
||
redis-node-primary-2: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.12 | ||
environment: *environment_primary | ||
healthcheck: *healthcheck_primary | ||
|
||
redis-node-primary-3: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.13 | ||
environment: *environment_primary | ||
healthcheck: *healthcheck_primary | ||
|
||
redis-node-primary-4: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.14 | ||
environment: *environment_primary | ||
healthcheck: *healthcheck_primary | ||
|
||
redis-node-primary-5: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.15 | ||
environment: *environment_primary | ||
healthcheck: *healthcheck_primary | ||
|
||
redis-node-backup-0: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.20 | ||
environment: &environment_backup | ||
- 'ALLOW_EMPTY_PASSWORD=yes' | ||
- 'REDIS_NODES=redis-node-backup-0 redis-node-backup-1 redis-node-backup-2' | ||
healthcheck: | ||
&healthcheck_backup | ||
test: | ||
[ | ||
"CMD-SHELL", | ||
"OUT=`redis-cli cluster slots`; | ||
echo $$OUT | grep 172.16.1.20 || exit 1; | ||
echo $$OUT | grep 172.16.1.21 || exit 1; | ||
echo $$OUT | grep 172.16.1.22 || exit 1; | ||
echo $$OUT | grep 172.16.1.23 || exit 1; | ||
echo $$OUT | grep 172.16.1.24 || exit 1; | ||
echo $$OUT | grep 172.16.1.25 || exit 1;" | ||
] | ||
interval: 1s | ||
timeout: 3s | ||
retries: 30 | ||
|
||
redis-node-backup-1: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.21 | ||
environment: *environment_backup | ||
healthcheck: *healthcheck_backup | ||
|
||
redis-node-backup-2: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.22 | ||
environment: *environment_backup | ||
healthcheck: *healthcheck_backup | ||
|
||
redis-node-backup-3: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.23 | ||
environment: *environment_backup | ||
healthcheck: *healthcheck_backup | ||
|
||
redis-node-backup-4: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.24 | ||
environment: *environment_backup | ||
healthcheck: *healthcheck_backup | ||
|
||
redis-node-backup-5: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.25 | ||
environment: *environment_backup | ||
healthcheck: *healthcheck_backup | ||
|
||
redis-cluster-init-primary: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.2 | ||
depends_on: | ||
- redis-node-primary-0 | ||
- redis-node-primary-1 | ||
- redis-node-primary-2 | ||
- redis-node-primary-3 | ||
- redis-node-primary-4 | ||
- redis-node-primary-5 | ||
environment: | ||
- 'ALLOW_EMPTY_PASSWORD=yes' | ||
- 'REDIS_CLUSTER_REPLICAS=1' | ||
- 'REDIS_NODES=redis-node-primary-0 redis-node-primary-1 redis-node-primary-2 redis-node-primary-3 redis-node-primary-4 redis-node-primary-5' | ||
- 'REDIS_CLUSTER_CREATOR=yes' | ||
|
||
redis-cluster-init-backup: | ||
image: bitnami/redis-cluster:6.0-debian-10 | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.3 | ||
depends_on: | ||
- redis-node-backup-0 | ||
- redis-node-backup-1 | ||
- redis-node-backup-2 | ||
- redis-node-backup-3 | ||
- redis-node-backup-4 | ||
- redis-node-backup-5 | ||
environment: | ||
- 'ALLOW_EMPTY_PASSWORD=yes' | ||
- 'REDIS_CLUSTER_REPLICAS=1' | ||
- 'REDIS_NODES=redis-node-backup-0 redis-node-backup-1 redis-node-backup-2 redis-node-backup-3 redis-node-backup-4 redis-node-backup-5' | ||
- 'REDIS_CLUSTER_CREATOR=yes' | ||
|
||
shotover-0: | ||
networks: | ||
cluster_subnet: | ||
ipv4_address: 172.16.1.4 | ||
depends_on: | ||
redis-node-primary-0: | ||
condition: service_healthy | ||
redis-node-primary-1: | ||
condition: service_healthy | ||
redis-node-primary-2: | ||
condition: service_healthy | ||
redis-node-primary-3: | ||
condition: service_healthy | ||
redis-node-primary-4: | ||
condition: service_healthy | ||
redis-node-primary-5: | ||
condition: service_healthy | ||
redis-node-backup-0: | ||
condition: service_healthy | ||
redis-node-backup-1: | ||
condition: service_healthy | ||
redis-node-backup-2: | ||
condition: service_healthy | ||
redis-node-backup-3: | ||
condition: service_healthy | ||
redis-node-backup-4: | ||
condition: service_healthy | ||
redis-node-backup-5: | ||
condition: service_healthy | ||
image: shotover/shotover-proxy:v0.2.0 | ||
volumes: | ||
- .:/config | ||
|
||
networks: | ||
cluster_subnet: | ||
name: cluster_subnet | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 172.16.1.0/24 | ||
gateway: 172.16.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
sources: | ||
- Redis: | ||
name: redis | ||
listen_addr: "0.0.0.0:6379" | ||
chain: | ||
- Tee: | ||
behavior: Ignore | ||
buffer_size: 10000 | ||
chain: | ||
# drop read requests to the backup cluster. | ||
# This is needed for performance not correctness as the Tee would drop the actual read response anyway. | ||
- QueryTypeFilter: | ||
DenyList: [Read] | ||
# submit requests to the backup cluster in batches of 2000 requests. | ||
# this is another performance boost as it amortizes the cost of submitting a message. | ||
- Coalesce: | ||
flush_when_buffered_message_count: 2000 | ||
flush_when_millis_since_last_flush: 100 | ||
# and finally send the requests and receive their responses from the backup cluster. | ||
- RedisSinkCluster: | ||
first_contact_points: | ||
- "172.16.1.20:6379" | ||
- "172.16.1.21:6379" | ||
- "172.16.1.22:6379" | ||
- "172.16.1.23:6379" | ||
- "172.16.1.24:6379" | ||
- "172.16.1.25:6379" | ||
connect_timeout_ms: 3000 | ||
- RedisSinkCluster: | ||
first_contact_points: | ||
- "172.16.1.10:6379" | ||
- "172.16.1.11:6379" | ||
- "172.16.1.12:6379" | ||
- "172.16.1.13:6379" | ||
- "172.16.1.14:6379" | ||
- "172.16.1.15:6379" | ||
connect_timeout_ms: 3000 |
Oops, something went wrong.