A Kafka deployment needs more than brokers. Topics, configurations, partition details, and other operational metadata must be coordinated. In KRaft mode, a controller quorum handles that work: controllers replicate a metadata log and use majority decisions to keep cluster coordination fault-tolerant. Controller capacity and placement therefore belong in production planning, not just broker sizing. section 9.0 section 9.1.3
Controllers and brokers can have separate roles. In a three-controller static quorum, each controller has a unique node.id, process.roles=controller, a shared controller.quorum.voters list, and a listener for controller communication. A broker uses process.roles=broker and the voter list to find controllers, while also defining listeners for broker and client traffic. section 9.1.2
Listing 9.1 An example of a KRaft controller’s configuration (static quorum)
node.id=1 #1 process.roles=controller #2 controller.quorum.voters=1@node1:9093,2@node2:9093,3@node3:9093 #3 controller.listener.names=CNTRL #4 listeners=CNTRL://node1:9093 #5 listener.security.protocol.map=CNTRL:PLAINTEXT #6
The configuration shows how one controller identifies itself, names all three voters, and exposes its controller listener; each other controller needs a different node.id. section 9.1.2
If the leader controller stops responding, followers detect the timeout through their metadata fetch requests and may stand for election. A candidate requests votes with information about its metadata log; a majority elects a new leader. Before serving brokers, that leader verifies it has the previously committed entries. Brokers use their configured controller list to locate it and refresh their metadata state. section 9.1.3
The quorum has consequences beyond initial configuration:
- Plan controller placement for failure domains. A stretched cluster needs a majority of controllers operational; the three-data-center example places one controller in each location. section 11.4.1
- After safely migrating a broker’s leadership and replicas and shutting it down, remove its metadata from the controller quorum. section 11.1.2
- Treat a move from ZooKeeper to KRaft as an operational architecture decision: metadata coordination and controller configuration must be planned alongside deployment and incident response. section 9.0
