liveBook · Manning

Zab

As explained in Kafka for Architects

ZooKeeper Atomic Broadcast is the protocol ZooKeeper uses to order and replicate state changes among its servers.

ZooKeeper Atomic Broadcast (ZAB) orders and replicates Kafka metadata changes among ZooKeeper servers. A dynamically elected leader coordinates followers, and changes commit after replication. section 9.1.4

Within a ZooKeeper-managed Kafka cluster, ZAB supports:

  • Replicating topic-creation requests, partition assignments, and other metadata updates. section 9.1.4
  • Requiring a majority acknowledgment; a 2N+1 quorum tolerates up to N failed servers. section 9.1.4
  • Coordinating through the active Kafka controller, which communicates with the ZooKeeper leader and distributes updates to brokers. section 9.1.4

Metadata change

When a client requests a topic or configuration change, the request reaches the active controller, which coordinates with the ZooKeeper leader; ZAB replicates the change to followers before commitment. section 9.1.4

Figure 9.6 Various types of communication within a Kafka cluster using ZooKeeper
A screenshot of a computer

AI-generated content may be incorrect.

Use the communication diagram to trace interactions among brokers, the active controller, and the ZooKeeper ensemble. section 9.1.4

How Kafka for Architects covers it

How deep it goes
Explains leader-follower replication, majority acknowledgment, and commitment timing, but not protocol internals.
Examples
Uses topic creation, partition assignments, broker heartbeats, and a Kafka-ZooKeeper communication diagram.
What you can do after
Evaluate how ZooKeeper-based Kafka commits metadata changes and tolerates server failures.
How it connects
Connects ZooKeeper with Kafka metadata, active controllers, broker liveness, quorum systems, and KRaft.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.