liveBook · Manning

Controller failure

As explained in Kafka for Architects

A controller failure is the condition in which a Kafka controller becomes unavailable or stops participating in controller coordination.

A controller failure occurs when a Kafka controller becomes unavailable or stops participating in controller coordination. Because controllers manage metadata, leadership elections, partition assignments, ACLs, consumer groups, and transaction states, failure can halt cluster coordination even while brokers continue storing and serving data. section 9.1.3 section 9.5

When the leader controller fails, follower controllers stop receiving fetch responses within controller.quorum.fetch.timeout.ms and enter the candidate state. Candidates exchange vote requests containing replicated metadata-log information; the candidate with a majority becomes leader. Before serving, the new leader verifies and completes its committed metadata state. section 9.1.3

The failure has several operational consequences:

  • Brokers use their configured controller.quorum.voters list to locate the newly elected controller and refresh their metadata state. section 9.1.3
  • Quorum sizing determines tolerance: tolerating N controller failures requires 2N + 1 controllers, preserving a majority of N + 1. section 9.5
  • Without a majority quorum, leader elections and metadata changes halt, making controller availability a high-availability and incident-playbook concern. section 9.5

Leader-controller failover

A follower stops receiving the leader's fetch response within the configured timeout, begins an election, and wins a majority vote. It synchronizes missing committed metadata entries before accepting broker metadata requests. section 9.1.3

How Kafka for Architects covers it

How deep it goes
Traces leader detection, Raft election, metadata synchronization, and broker reconnection, but does not detail follower-failure handling.
Examples
Uses controller.quorum.fetch.timeout.ms, controller.quorum.voters, vote requests, and committed metadata entries to illustrate failover.
What it assumes
Assumes familiarity with Kafka brokers, controllers, replicated metadata logs, and majority-based quorum decisions.
What you can do after
Diagnose controller failover and size a quorum that preserves elections and metadata changes after failures.
How it connects
Connects controller failure with KRaft, Raft quorum, metadata logs, leader elections, brokers, and metadata updates.

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