ZooKeeper is a separate coordination cluster historically used by Kafka to store cluster metadata, monitor broker liveness, and coordinate the active controller. Kafka brokers manage topics, partitions, and client communication, while ZooKeeper provides the coordination layer. section 9.1.4
A ZooKeeper-managed Kafka deployment divides responsibilities across two cooperating systems:
- Metadata management: brokers send updates such as topic creation and partition assignments to the ZooKeeper leader, which replicates them to followers through the ZooKeeper Atomic Broadcast protocol. section 9.1.4
- Broker liveness: brokers send heartbeats; when a heartbeat times out, ZooKeeper marks the broker unavailable and partition leadership is reassigned. section 9.1.4
- Controller coordination: an active Kafka controller communicates with the ZooKeeper leader, loads metadata into memory, and distributes cluster-state updates to other brokers. section 9.1.4
Migration pressure
A Kafka cluster using ZooKeeper must account for an architectural transition: KRaft became experimental in Kafka 2.8.0, the default metadata system in 3.7.0, and Kafka 4.0 requires ZooKeeper to be removed. Upgrades therefore require compatibility checks across brokers, Kafka Connect, Schema Registry, REST Proxy, client libraries, the operating system, and the Java runtime. section 11.1
Figure 9.6 Various types of communication within a Kafka cluster using ZooKeeper
Use the architecture diagram to trace communication among ZooKeeper servers, Kafka brokers, the active controller, and clients. section 9.1.4


