Skip to content
Kafka Is FunProgress

AdvancedInternals Deep Dive

Explain the Kafka consumer group coordinator and rebalance protocol in detail.

Reference answer

The Group Coordinator is a partition of the __consumer_offsets topic's leader. Protocol: 1) JOIN_GROUP: consumers send JoinGroupRequest — one is elected group leader by the coordinator. 2) SYNC_GROUP: the client group leader computes partition assignments and sends SyncGroupRequest with assignments. All members send SyncGroupRequest and receive their assigned partitions. 3) HEARTBEAT: members maintain liveness. With cooperative rebalancing, steps 1-2 may run twice — first to identify which partitions to revoke (incremental), then to assign them to new owners.

Expected key concepts: Group Coordinator, __consumer_offsets, JOIN_GROUP, SYNC_GROUP, group leader, partition assignments, HEARTBEAT, cooperative rebalancing, incremental, revoke