什么是zookeeper端口及其用途? [英] what is zookeeper port and its usage?
问题描述
我对zookeeper端口很陌生,我过去几天通过它遇到了.
我用 zookeeper port 关键字介绍了两次:
I am quite new for zookeeper port through which I am coming across from past few days.
I introduced with zookeeper port keyword at two occasion:
- while configuring neo4j db cluster (link) and
- while running compiled voltdb catalog (link) (See Network Configuration Arguments)
然后,我遇到了Apache Zookeeper,(我猜这与分布式应用程序有关,我是一个分布式应用程序中的新手).因此我想到了一个问题:
Then, I came across Apache Zookeeper, (which I guess is related to distributed application, I am a newbie in distributed application as well). hence question came in my mind:
- 在上述 2 个场景中是否有任何 apache zookeeper 的实现?
- 这个 zookeeper 端口究竟在内部做什么?
任何帮助将不胜感激,谢谢.
Any help would be appreciated, Thanks.
推荐答案
Zookeeper 用于分布式应用程序,主要用于配置管理和高可用性操作.Zookeeper 通过主从架构来做到这一点.Neo4j 和 VoltDb 可能为此使用了 zookeeper
Zookeeper is used in distributed applications mainly for configuration management and high availability operations. Zookeeper does this by a Master-Slave architecture. Neo4j and VoltDb might be using zookeeper for this purpose
进入端口理解:假设你有 3 台动物园管理员服务器......你需要在配置中提及
Coming to the ports understanding : suppose u have 3 servers for zookeepers ... You need to mention in configuration as
clientPort=2181
server.1=zookeeper1:2888:3888
server.2=zookeeper2:2888:3888
server.3=zookeeper3:2888:3888
其中一台服务器是主服务器,其余服务器都是从服务器.如果任何服务器关闭,那么zookeeper会自动选举领导.
Out of these one server will be the master and rest all will be slaves.If any server goes OFF then zookeeper elects leader automatically .
服务器监听三个端口:2181 用于客户端连接;2888 为追随者连接,如果他们是领导者;和 3888 为其他领导选举阶段的服务器连接.
Servers listen on three ports: 2181 for client connections; 2888 for follower connections, if they are the leader; and 3888 for other server connections during the leader election phase .
这篇关于什么是zookeeper端口及其用途?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!