简体   繁体   English

AWS Multi Region VPC中的Cassandra(VPC对等)

[英]Cassandra in AWS Multi Region VPC (VPC peering)

We are trying to setup following cluster geography for Cassandra: 我们正在尝试为Cassandra设置以下群集地理位置:

2 VPCs in 2 different AWS regions (US-West, APAC-Singapoore) 2个不同AWS区域(美国西部,亚太地区-新加坡)中的2个VPC
VPCs connected via VPC peering (common IP space) 通过VPC对等连接的VPC(公用IP空间)
2 Cassandra nodes in each DC, 1 DC in each region (4 nodes total) 每个DC 2个Cassandra节点,每个区域1 DC(总共4个节点)
Nodes communicating together with private IP in VPC 节点与VPC中的专用IP一起通信
Connection to nodes should be available only inside VPC, no Public IPs! 到节点的连接应该仅在VPC内部可用,而不能使用公共IP!

Using Gossiping Snitch 使用闲聊小偷
Looks like nodes in one region are able to see second region DC, but not the other way around. 看起来一个区域中的节点能够看到第二个区域DC,而其他方向则看不到。 Spend some time and cannot find the issue. 花一些时间,找不到问题。

What configuration setup would you recommend? 您会建议哪种配置设置? Maybe good advice how to troubleshoot possible network misconfigurations 也许是很好的建议,如何解决可能的网络配置错误
Node 1 (us-west-2a - 10.200.0.100) 节点1(us-west-2a-10.200.0.100)

cassandra.yaml
broadcast_address: 10.200.0.100
listen_address: 10.200.0.100
rpc_address: 0.0.0.0
broadcast_rpc_address: 10.200.0.100

Nodetool output on DC1 node 1 (us-west-2a) DC1节点1(us-west-2a)上的Nodetool输出

Datacenter: ap-southeast
    Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address       Load       Tokens       Owns    Host ID       Rack 
DN  10.201.1.77   97.02 KB   256          ?       ac72b936-8c5c-41db-ad06-fa056759e704  1a
DN  10.201.1.93   141.97 KB  256          ?       78c4b0c5-adff-40b8-913d-8be063454643  1a

Datacenter: us-west-2a

Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address       Load       Tokens       Owns    Host ID    Rack 
UN  10.200.0.52   671.59 KB  256          ?       b84f2113-90ef-43d4-91df-eed3fbb6ff79  2a
UN  10.200.0.100  516.96 KB  256          ?       3ce8d7ea-d586-48f8-9f8a-b9a5c1fb8fa0  2a

Node 3 (ap-southeast - 10.201.1.93) 节点3(ap-southeast-10.201.1.93)

cassandra.yaml
broadcast_address: 10.201.1.93
listen_address: 10.201.1.93
rpc_address: 0.0.0.0
broadcast_rpc_address: 10.201.1.93

Nodetool output for DC2 node 3 (ap-southeast) DC2节点3(ap-southeast)的Nodetool输出

Datacenter: ap-southeast

Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address      Load       Tokens       Owns    Host ID   Rack 
UN  10.201.1.93  136.2 KB   256          ?       78c4b0c5-adff-40b8-913d-8be063454643  1a

Did you try using a VPN to connect the two? 您是否尝试使用VPN来连接两者? I don't think VPC Peering works across multiple regions. 我认为VPC对等不能在多个区域使用。 It's only for connecting VPCs within the same region. 仅用于连接同一区域内的VPC。

https://notes.ayushsharma.in/2017/02/connecting-vpcs-in-2-aws-regions-site-to-site-vpn https://notes.ayushsharma.in/2017/02/connecting-vpcs-in-2-aws-regions-site-to-site-vpn

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM