Reputation: 258
Suppose I have 5 node configuration in the Zookeeper {1,2,3,4,5} Zookeeper says that a leader is elected when a majority of nodes vote for any given node then, the node having majority of nodes is selected as the leader. Zookeeper benchmark says that a leader election typically takes 200 ms.
My question is how is the convergence achieved?
Do all nodes start voting for the node 1 as the leader or they start selecting the leader randomly? If the appointment of leader is totally random then how does it ensure convergence or such fast rates of leader election?
Thanks for the answer! Help appreciated!
Upvotes: 3
Views: 2608