Skip to content
Kafka Is Fun

Lesson 3 of 5

The Metadata Log

1 min read

Overview

In KRaft the cluster metadata lives in an internal single-partition topic, __cluster_metadata, whose replication is managed by Raft. Changes such as broker registration, topic creation and partition changes are appended to it as metadata records, and the active controller, the quorum leader, is the one that appends them. Brokers fetch the metadata log from the active controller and apply the changes in order. The controllers store all the cluster's metadata in memory and on disk.

Key configuration

Broker and controller settingsproperties
metadata.log.dir — where the metadata log is stored; if it is not set, the first log.dirs directory is used
metadata.log.segment.bytes=1073741824 — default, 1 GiB: the maximum size of a single metadata log file

Production tip

Check yourself

How do brokers learn about metadata changes in KRaft mode?

Sources

Checked against Kafka 4.2 documentation on Oct 2026. Draft: not yet reviewed by a Kafka specialist. Releases move on, so confirm against the current documentation before you act on a number.

Try it in the simulator

Guided scenarios for this module — the simulator opens with the exercise already running.

Prefer a picture? Open the live cluster in 3D and watch records move between producer, brokers and consumers.

Browse all troubleshooting entries