[英]Running zookeeper on a cluster of 2 nodes
I am currently working on trying to use zookeeper in a two node cluster. 我目前正在尝试在双节点集群中使用zookeeper。 I have my own cluster formation algorithm running on the nodes based on configuration.
我根据配置在节点上运行自己的集群编队算法。 We only need Zookeeper's distributed DB functionality.
我们只需要Zookeeper的分布式数据库功能。
Note: Fault tolerance is not the main concern in this project. 注意:容错不是此项目的主要关注点。 If one of the nodes go down we have enough code logic to run without the zookeeper service.
如果其中一个节点出现故障,我们就有足够的代码逻辑在没有zookeeper服务的情况下运行。 We use the zookeeper to share data when both the nodes are alive.
当两个节点都处于活动状态时,我们使用zookeeper来共享数据。
Would greatly appreciate any help. 非常感谢任何帮助。
Zookeeper is a coordination system which is basically used to coordinate among nodes. Zookeeper是一个协调系统,主要用于节点之间的协调。 When writes are occurred to such a distributed system, in ordered to coordinate and agree upon values which are being stored, all the writes are gone through
master (aka leader)
. 当对这样的分布式系统进行写入时,按顺序协调并同意存储的值,所有写入都通过
master (aka leader)
。 Reads can occur through any node. 读取可以通过任何节点进行。 Zookeeper requires a master/leader to be elected per a quorum in order to serve write requests consistently.
Zookeeper要求每个法定人数选择一个主/领导者,以便始终如一地提供写请求。 Zookeeper make use of the ZAB protocol as the consensus algorithm.
Zookeeper使用ZAB协议作为一致性算法。
As I see, what you need is a distributed database. 正如我所见,您需要的是分布式数据库。 Not a distributed coordination system.
不是分布式协调系统。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.