To tolerate the loss of two ZooKeeper servers, what is the minimum total number of servers in the ensemble?

Study for the CCDAK Apache Kafka Test. Use flashcards and multiple choice questions with hints and explanations for each question. Prepare thoroughly for your exam!

Multiple Choice

To tolerate the loss of two ZooKeeper servers, what is the minimum total number of servers in the ensemble?

Explanation:
ZooKeeper needs a majority of the ensemble to be up to make progress, which is called a quorum. To tolerate f server failures, you must have at least 2f + 1 nodes so that, even with f nodes down, the remaining nodes still form a majority. For tolerating two failures, that means at least 5 servers. With five, if two fail, three remain and still constitute a majority to elect a leader and continue operating. A smaller ensemble won’t have a majority with two failures (four nodes left would need three for a majority, but two remaining isn’t enough). A larger ensemble like seven would also tolerate two failures, but it’s not the minimum. Hence the minimum total is five.

ZooKeeper needs a majority of the ensemble to be up to make progress, which is called a quorum. To tolerate f server failures, you must have at least 2f + 1 nodes so that, even with f nodes down, the remaining nodes still form a majority. For tolerating two failures, that means at least 5 servers. With five, if two fail, three remain and still constitute a majority to elect a leader and continue operating. A smaller ensemble won’t have a majority with two failures (four nodes left would need three for a majority, but two remaining isn’t enough). A larger ensemble like seven would also tolerate two failures, but it’s not the minimum. Hence the minimum total is five.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy