Next-Gen Rebalancing: Cooperative Sticky & KIP-848
Eliminate stop-the-world rebalance storms with Cooperative Sticky assignment, explore the KIP-848 next-gen consumer protocol, and understand KIP-932 share groups.
In the early days of Kafka, consumer group rebalances were notoriously disruptive. Whenever a single consumer joined or restarted, every consumer in the group had to revoke all of its assigned partitions, stop processing, and wait for a cluster-wide reassignment.
This "stop-the-world" eager rebalance caused latency spikes, consumer lag explosions, and cache invalidation storms in large enterprise environments.
In this lesson, you will learn how Cooperative Sticky Rebalancing transformed partition handoffs into non-blocking incremental operations, explore the revolutionary KIP-848 Next-Generation Consumer Protocol in Kafka 4.0, and preview KIP-932 Share Groups.
01The Problem with Eager Rebalancing
Under the legacy eager rebalance protocol used by RangeAssignor and RoundRobinAssignor:
- Total Revocation: When Consumer 3 joins a 2-consumer group, Consumer 1 and Consumer 2 are forced to revoke all of their partitions (
Partition 0, 1, 2, 3). - Stop-the-World Freeze: All record processing halts completely while all members send
JoinGroupandSyncGrouprequests. - Thundering Herd: Once the new plan arrives, consumers resume reading. Because all partitions were revoked, any in-memory state, local RocksDB state stores, or database caches must be rebuilt simultaneously, causing severe CPU and disk I/O thrashing.
For groups consuming hundreds of partitions, an eager rebalance could freeze processing for 30 to 90 seconds.
Loading the rest of the lesson…