Skip to content
Kafka Is Fun

Lesson 4 of 6

Brokers & Clusters

1 min read

Overview

A Kafka broker is a server that stores partitions and serves producers and consumers, and a cluster is a group of brokers. Under normal conditions each partition has a single leader and zero or more followers: all writes go to the leader, reads normally go to the leader but can be served by followers (KIP-392), and followers replicate by fetching from the leader. In KRaft mode a set of controllers keeps all the cluster's metadata in memory and on disk, with one active controller and the rest hot standbys, and the active controller is the one that elects partition leaders.

Key configuration

Broker settingsproperties
node.id — the node's unique id (an essential setting in KRaft mode); broker.id is the broker id setting
num.network.threads=3 — threads receiving requests from the network and sending responses
num.io.threads=8 — threads processing requests, which may include disk I/O

Production tip

Check yourself

Which broker receives all writes for a given partition?

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.