liveBook · Manning

Metadata log

As explained in Apache Kafka in Action

__cluster_metadata is Kafka's internal topic for storing cluster metadata across brokers in KRaft mode.

The metadata log, named __cluster_metadata, is Kafka’s internal topic for storing the cluster metadata required to operate a KRaft cluster. It replaces the metadata previously held in ZooKeeper and gives brokers a consistent view of cluster state. section 7.1 section 7.5

The log supports coordination and failure handling by:

  • Replicating metadata across all brokers, regardless of whether they run controller, broker, or combined roles. section 7.1
  • Supporting controllers as they manage partition assignments, leader elections, and failover after broker or controller failures. section 7.1 section 7.5
  • Reducing operational dependence on a separate ZooKeeper system by integrating coordination into Kafka through KRaft. section 7.5

Cluster metadata flow

In a KRaft deployment, controllers coordinate cluster state while __cluster_metadata is replicated across the brokers. If the active controller fails, a standby controller takes over and continues managing assignments and leadership using the shared metadata. section 7.1

Figure 7.1 With Kafka 3.3, ZooKeeper was replaced by a coordination cluster based on the Raft consensus protocol.
A screenshot of a computer screen

AI-generated content may be incorrect.

Use the architecture figure to relate the metadata log to the Raft-based coordination cluster that replaced ZooKeeper. section 7.1

How Apache Kafka in Action covers it

How deep it goes
Explains its purpose, replication scope, and operational role, but does not detail record formats or log internals.
Examples
Uses the __cluster_metadata topic, replicated broker state, and active-to-standby controller takeover as concrete examples.
What it assumes
Assumes familiarity with Kafka brokers and partitions while contrasting KRaft coordination with ZooKeeper-based management.
What you can do after
Evaluate/understand how KRaft stores and distributes Kafka cluster metadata during coordination and failover.
How it connects
Connects KRaft, Raft consensus, controllers, ZooKeeper, partition assignments, leader elections, and failover.

Also explained in

Compare how 2 books explain metadata log →

Related concepts

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