Zookeeper easy
Why is a ZooKeeper cluster (Ensemble) typically deployed with an odd number of servers (e.g., 3, 5, 7)?
- A To maximize the parallel hashing throughput of the internal data ingestion pipeline.
- B To minimize the physical rack space required for secondary failover nodes.
- C To ensure a Majority Vote (Quorum) can be reached easily without a tie, allowing for predictable failure tolerance.
- D It is a legacy requirement carried over from early non-distributed filesystem protocols.
Answer: C. To ensure a Majority Vote (Quorum) can be reached easily without a tie, allowing for predictable failure tolerance.
To survive partitions, ZooKeeper needs a majority (`N/2 + 1`). Having 4 nodes offers the same fault tolerance as 3 nodes (both tolerate only 1 failure), so adding the 4th node adds cost without improving availability.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is the primary technical function of a ZooKeeper 'Watch'?
- A system administrator increases `jute.maxbuffer` to 5MB on every ZooKeeper server to store large configuration objects. However, write operations larger than 1MB still fail. What is the most likely cause?
- By default, `forceSync` is enabled. If you disable it, what trade-off are you making?
- If the specific ZooKeeper node a client is connected to crashes, what should the client do?
- Which cluster configuration has *worse* availability: A 3-node cluster or a 4-node cluster? (Assuming simple majority quorum)
- According to the CAP Theorem, how is ZooKeeper classified?