Skip to content
Kafka Is Fun

Lesson 4 of 5

Controller Epochs & Fencing

1 min read

Overview

Each leader election in the controller quorum increments the leader epoch, a monotonically increasing number; the monitoring page calls it the quorum epoch. Every quorum request carries an epoch, and a node that receives a request with an older epoch than its own rejects it with FENCED_LEADER_EPOCH, which fences a stale leader (a "zombie") after a re-election. In KRaft, brokers pull metadata from the active controller; the epoch check is how the quorum itself keeps an old leader from acting.

Analogy

Production tip

Check yourself

A quorum node receives a request carrying a leader epoch lower than the latest one it has seen. What does it do?

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