我有两个服务器在不同的数据中心。
for DC1中的第一个服务器如下所示:
version: '3'
services:
scylla-n1:
restart: always
image: scylladb/scylla:4.5.2
container_name: scylla-n1
command: --seeds=10.10.10.1, 20.20.20.2, scylla-n1,scylla-n2 --smp 8 --memory 16G --authenticator PasswordAuthenticator --authorizer CassandraAuthorizer
networks:
netscylla:
ipv4_address: 172.16.0.11
ports:
- 21021:9042
- 9142:9142
- 7000:7000
- 7001:7001
- 7199:7199
- 10000:10000
- 9180:9180
- 9100:9100
- 9160:9160
- 10001:10001
- 5609:5609
- 56090:56090
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "1m"
scylla-n2:
restart: always
image: scylladb/scylla:4.5.2
container_name: scylla-n2
command: --seeds=scylla-n1,scylla-n2 --smp 4 --memory 8G --authenticator PasswordAuthenticator --authorizer CassandraAuthorizer
networks:
netscylla:
ipv4_address: 172.16.0.12
ports:
- 21022:9042
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "1m"
networks:
netscylla:
ipam:
config:
- subnet: 172.16.0.10/24并为第二台服务器编写如下所示:
version: '3'
services:
scylla-n1:
restart: always
image: scylladb/scylla:4.5.2
container_name: scylla-n1
command: --seeds=10.10.10.1, 20.20.20.2, scylla-n1,scylla-n2 --smp 8 --memory 16G --authenticator PasswordAuthenticator --authorizer CassandraAuthorizer
networks:
netscylla:
ipv4_address: 172.16.0.11
ports:
- 21021:9042
- 9142:9142
- 7000:7000
- 7001:7001
- 7199:7199
- 10000:10000
- 9180:9180
- 9100:9100
- 9160:9160
- 10001:10001
- 5609:5609
- 56090:56090
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "1m"
scylla-n2:
restart: always
image: scylladb/scylla:4.5.2
container_name: scylla-n2
command: --seeds=scylla-n1,scylla-n2 --smp 4 --memory 8G --authenticator PasswordAuthenticator --authorizer CassandraAuthorizer
networks:
netscylla:
ipv4_address: 172.16.0.12
ports:
- 21022:9042
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "1m"
networks:
netscylla:
ipam:
config:
- subnet: 172.16.0.10/24是否可以在第一服务器和第二服务器中的停靠器内创建多个节点,然后连接scylla,这两个服务器都是scylla。谢谢你的帮忙
发布于 2022-01-06 04:22:38
与来自锡拉的产品顾问进行研究和咨询。我已解决了这些问题:
Scylla arsitecture如果使用虚拟节点必须是公共云源https://www.scylladb.com/product/technology/
所以,docker-compose.yaml我将映射端口更改为公共ip,如下所示
version: '3'
services:
scylla-1:
restart: always
image: scylladb/scylla:4.5.2
container_name: scylla-1
command: --seeds=[Public-IP-1],[Public-IP-2] --smp 8 --memory 32G --authenticator PasswordAuthenticator --authorizer CassandraAuthorizer
ports:
- [Public-IP-1]:9042:9042
- [Public-IP-1]:9142:9142
- [Public-IP-1]:7000:7000
- [Public-IP-1]:7001:7001
- [Public-IP-1]:7199:7199
- [Public-IP-1]:10000:10000
- [Public-IP-1]:9180:9180
- [Public-IP-1]:9100:9100
- [Public-IP-1]:9160:9160
- [Public-IP-1]:10001:10001
- [Public-IP-1]:5609:5609
- [Public-IP-1]:56090:56090
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "1m"
scylla-2:
restart: always
image: scylladb/scylla:4.5.2
container_name: scylla-2
command: --seeds=[Public-IP-1],[Public-IP-2] --smp 8 --memory 32G --authenticator PasswordAuthenticator --authorizer CassandraAuthorizer
ports:
- [Public-IP-2]:9042:9042
- [Public-IP-2]:9142:9142
- [Public-IP-2]:7000:7000
- [Public-IP-2]:7001:7001
- [Public-IP-2]:7199:7199
- [Public-IP-2]:10000:10000
- [Public-IP-2]:9180:9180
- [Public-IP-2]:9100:9100
- [Public-IP-2]:9160:9160
- [Public-IP-2]:10001:10001
- [Public-IP-2]:5609:5609
- [Public-IP-2]:56090:56090
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "1m"https://stackoverflow.com/questions/70573081
复制相似问题