Amazon ec2 Aerospike&x27;在EC2上的行为
在EC2上的测试设置中,我完成了以下工作:Amazon ec2 Aerospike&x27;在EC2上的行为,amazon-ec2,nosql,key-value,aerospike,Amazon Ec2,Nosql,Key Value,Aerospike,在EC2上的测试设置中,我完成了以下工作: 一台Aerospike服务器正在ZoneA中运行(如Aerospike-A) 同一集群的另一个节点正在ZoneB中运行(比如Aerospike-B) 使用上述集群的应用程序正在ZoneA中运行 我是这样初始化AerospikeClinet的: hosts= new Host[]; hosts[0] = new Host(PUBLIC_IP_OF_AEROSPIKE-A, 3000); AerospikeClient client = new Aeros
hosts= new Host[];
hosts[0] = new Host(PUBLIC_IP_OF_AEROSPIKE-A, 3000);
AerospikeClient client = new AerospikeClient(policy, hosts);
Questions:
a. In above scenario, I would expect Aerospike-B to take all the traffic. But this is not happening. Is there anything I am doing wrong?
b. Should I be giving both the hosts while initializing the client?
c. I had executed "clinfo -v 'config-set:context=service;paxos-recovery-policy=auto-dun-all'" on both the nodes. Is that creating a problem?
访问地址设置为公共IP。否则,您的客户机可以到达一些节点,当集群节点尝试补偿您的读写操作并将其移动到正确的节点时,会发生大量代理事件,并且在节点离开或加入集群时会出现奇怪的数据问题
有关详细信息:
在EC2中,您应该将集群的所有节点放置在同一区域的同一个AZ中。您可以使用该功能在两个单独的AZ中设置节点,但每次写入都将支付a
现在你看到的是什么。每个EC2机器都有一个公共IP和一个本地IP。位于同一子网上的计算机可以通过本地IP相互访问,但来自不同子网的计算机不能。如果群集节点分布在两个可用性区域,则需要确保将访问地址设置为公共IP。否则,您的客户机可以到达一些节点,当集群节点尝试补偿您的读写操作并将其移动到正确的节点时,会发生大量代理事件,并且在节点离开或加入集群时会出现奇怪的数据问题
有关详细信息:
您如何知道写入将从客户端发送到Aerospike-B?Aerospike服务器可以对其他节点进行内部代理,并可以在那里创建对象。但这并不意味着客户端能够写入Aerospike-B。我猜客户端无法联系Aerospike-B。我使用clmonitor
检查延迟。在初始化客户端时,我向主机阵列添加了两个Host
s,现在一切正常!不需要在阵列中同时添加两台主机。如果一切正常,aerospike客户端应该能够发现集群的所有节点。在此之后,读/写操作应该同时进入两个节点。显然,在阵列中添加两个主机后,此问题就消失了。我使用的是(java)客户端的3.0.6版本。您如何知道写入将从客户端发送到Aerospike-B?Aerospike服务器可以对其他节点进行内部代理,并可以在那里创建对象。但这并不意味着客户端能够写入Aerospike-B。我猜客户端无法联系Aerospike-B。我使用clmonitor
检查延迟。在初始化客户端时,我向主机阵列添加了两个Host
s,现在一切正常!不需要在阵列中同时添加两台主机。如果一切正常,aerospike客户端应该能够发现集群的所有节点。在此之后,读/写操作应该同时进入两个节点。显然,在阵列中添加两个主机后,此问题就消失了。我使用的是(java)客户端的3.0.6版。
Questions:
a. In above scenario, I would expect Aerospike-B to take all the traffic. But this is not happening. Is there anything I am doing wrong?
b. Should I be giving both the hosts while initializing the client?
c. I had executed "clinfo -v 'config-set:context=service;paxos-recovery-policy=auto-dun-all'" on both the nodes. Is that creating a problem?