All Questions
Zookeeper hard

The ZooKeeper Atomic Broadcast (ZAB) protocol is often compared to a Two-Phase Commit (2PC). How does ZAB's commit logic specifically bypass the 'blocking' problem inherent in standard 2PC?

  1. A ZAB utilizes a three-phase commit (3PC) structure that introduces a 'pre-commit' state to handle leader failure without data loss.
  2. B ZAB relaxes the consensus requirement to a simple Quorum; the Leader commits as soon as a majority (`N/2+1`) of followers acknowledge the proposal.
  3. C ZAB uses an optimistic concurrency model that allows followers to acknowledge proposals based on local CPU availability rather than disk fsync.
  4. D ZAB leverages the Raft 'joint consensus' algorithm to allow for asynchronous shard rebalancing during the commit phase.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions