Zookeeper medium
The ZAB (ZooKeeper Atomic Broadcast) protocol provides a 'Total Order' guarantee. What does this mean in practice?
- A All messages are encrypted using a global asymmetric key before being stored in the transaction log.
- B If the Leader broadcasts Message A then Message B, all Followers will apply these state changes in the exact same sequence.
- C It ensures that read requests are perfectly balanced across all nodes using a consistent hashing algorithm.
- D It guarantees that the system is available for writes even if a majority of the nodes are physically disconnected.
Answer: B. If the Leader broadcasts Message A then Message B, all Followers will apply these state changes in the exact same sequence.
Ordering is everything. ZAB acts like a replicated log, ensuring the state machine on every node transitions through the exact same sequence of states.
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?