Zookeeper medium
A 5-node ZooKeeper ensemble suffers a network partition that splits it into Group A (2 nodes) and Group B (3 nodes). Which statement correctly describes the system's behavior?
- A Both groups continue serving writes to prevent data loss, potentially causing a divergent split-brain state.
- B Group A stops serving writes. Group B (Majority) elects/retains its leader and continues serving writes normally.
- C The entire ensemble enters 'safe mode' and rejects all operations (read and write) until all 5 nodes are reachable.
- D Group B continues as leader, but only for reads; all writes are blocked until Group A is also available for acknowledgment.
Answer: B. Group A stops serving writes. Group B (Majority) elects/retains its leader and continues serving writes normally.
This prevents data divergence. You need 3 votes to commit. Group A only has 2 votes, so it cannot commit anything. Group B has 3, so it wins.
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?