Zookeeper 运行在两个节点上 [英] Zookeeper running on two nodes

查看:40
本文介绍了Zookeeper 运行在两个节点上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种情况,Zookeeper 配置为 2 个节点,但有时它开始同时在两个节点上运行.为什么会发生这种情况?

解决方案

要使用主从架构进行集成,您需要有奇数个zookeeper server .ie{1, 3 ,5,7....etc}.3 的集成可以处理一台服务器崩溃..类似的 5 集成可以处理 2 台服务器......依此类推.

当您尝试创建 2 个服务器的集成时,zookeeper 实际上无法理解这是一个集成并将每个服务器视为单独的集成.

这里唯一的解决方案是运行另一个zookeeper服务器并将第三个服务器添加到该组中.或者您可以只运行一个服务器.要查看如何进行3个集合,请检查:什么是zookeeper端口及其用途?>

I have a situation where Zookeeper is configured for 2 nodes but at times it starts running on both the nodes simultaneously. Why this might be happening?

解决方案

To make an ensemble with Master-slave architecture you need to have odd number of zookeeper server .i.e.{1, 3 ,5,7....etc}. Ensemble of 3 can handle the one server crash ..similarly ensemble of 5 can handle 2 server ...so on .

When you are trying to create an ensemble of 2 servers ,zookeeper actually cannot understand this an ensemble and taking each server as individual ensemble.

The only solution here is to run another zookeeper server and add the 3rd one to this group.Or you can run only one server .To see how to make an ensemble of 3 pls check : what is zookeeper port and its usage?

这篇关于Zookeeper 运行在两个节点上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆