In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to solve the problem of odd and even nodes in zookeeper cluster, many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
I. Operation mode
There are three operation modes of Zookeeper: stand-alone mode, pseudo-cluster mode and cluster mode.
In view of the "half-survival" feature of cluster mode:
If more than half of the machines in the cluster work properly, then the whole cluster can be used externally.
For example: 2-node zookeeper, one primary node is dead, and the other standby node cannot provide cluster services because there is no more than half of it. The fault tolerance number is 0.
3-node zookeeper, one primary node is dead, and the other two backup nodes are more than half. Leader is successfully selected to provide cluster services, and the fault tolerance number is 1.
5-node zookeeper, two primary nodes are dead, the other three backup nodes are more than half, providing cluster services to the outside world, and the fault tolerance number is 2.
6-node zookeeper, two primary nodes are dead, and more than half of the other four standby nodes provide cluster services to the outside world. The fault tolerance number is 2.
From the third primary node, the other three backup nodes are not more than half, so it is impossible to sort out the elected Leader.
Summary:
1. The successful election of Leader requires more than half of the backup nodes, and the fault tolerance number of 2n and 2n-1 (n > 1) is the same.
two。 Cluster service even-numbered nodes are also possible, and the even fault-tolerant number is the same as the odd number, so there is no need to waste a node resource.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.