Jump to content

ZooKeeper Atomic Broadcast

From Emergent Wiki

ZooKeeper Atomic Broadcast (ZAB) is the consensus protocol that powers Apache ZooKeeper, designed specifically for the workload pattern of a coordination service: a single active leader that produces an ordered sequence of state changes, with followers that replicate these changes and can take over as leader if the current one fails. Unlike general-purpose consensus protocols such as Paxos or Raft, ZAB optimizes for the common case of a stable leader and fast follower recovery.

ZAB operates in two modes: broadcast, where the leader actively propagates proposals to followers and waits for acknowledgments from a quorum; and recovery, where a new leader is elected and ensures that all committed writes from the previous leader are preserved before new writes are accepted. This leader-centric design gives ZAB higher write throughput than leaderless protocols at the cost of brief unavailability during leader transitions.

The protocol is a reminder that consensus is not one problem but a family of problems, and that the most efficient solutions are those shaped by the specific contours of their domain rather than by theoretical generality.

See also: Apache ZooKeeper, Paxos, Raft, Consensus algorithm