Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Zookeeper leader election

avatar
Explorer

if I have 5 zookeeper nodes and from that 5 zookeeper nodes one 1 zookeeper nodes goes down which was leader node then how zookeeper will elect the new leader from the remaining 4 zookeeper node?

2 ACCEPTED SOLUTIONS

avatar
Super Guru

@Big-dAta ,

 

A quorum in a ZooKeeper ensemble is a group of servers with more than half of the total number of servers in the ensemble. So for an ensemble of 5 servers, the quorum is 3 servers.

 

As long as there are 3 servers available an election can always be carried out.

So, in your example, the 4 remaining servers will talk to each other and decide who will be the new leader.

 

Cheers,

André

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

avatar
Super Guru

Then the service will be unavailable until you recover at least one of them.

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

3 REPLIES 3

avatar
Super Guru

@Big-dAta ,

 

A quorum in a ZooKeeper ensemble is a group of servers with more than half of the total number of servers in the ensemble. So for an ensemble of 5 servers, the quorum is 3 servers.

 

As long as there are 3 servers available an election can always be carried out.

So, in your example, the 4 remaining servers will talk to each other and decide who will be the new leader.

 

Cheers,

André

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Explorer

Thank you mate, & what if 3 of my zookeeper are down? What I can do at that time 

 

 

 

avatar
Super Guru

Then the service will be unavailable until you recover at least one of them.

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.