Oh My Algorithm
Concept Guideeager · cooperative

Why Rebalancing Stalls

Whenever a consumer joins or leaves, the partition assignment has to be recalculated. The older protocol (eager) has every consumer give up everything first and then redivide, so partitions that never needed to move stop too. The cooperative protocol revokes only what actually has to move and lets the rest keep reading.

01 Concept at a Glance

Interactive Step-by-Step
eager · everyone revokes, then redivides
← earlier events · later events →
Partition 0
🔑Sign in
🛒Add to cart
💳Checkout
01234
👤 consumer-1
Partition 1
👀View item
🔍Search
01234
👤 consumer-1
Partition 2
🚪Sign out
🔁Reorder
01234
👤 consumer-2
everyone is reading normally right now

Two consumers are splitting three lanes. A third wants to join.

Logic Node1 / 5
cooperative · revoke only what moves
← earlier events · later events →
Partition 0
🔑Sign in
🛒Add to cart
💳Checkout
01234
👤 consumer-1
Partition 1
👀View item
🔍Search
01234
👤 consumer-1
Partition 2
🚪Sign out
🔁Reorder
01234
👤 consumer-2
everyone is reading normally right now

Same situation. Two consumers are reading and a third wants to join.

Logic Node1 / 5

02 Understand It Simply

For Everyone
🔑Analogy

Like redividing warehouse aisles: everyone walks out and files back in, versus only the people who need a different aisle moving. The first way creates a stretch where nobody works.

💡In Plain Words

Eager rebalancing is stop-the-world.

One consumer joins and everybody revokes their assignment and waits for the recalculation, so the whole group stops consuming meanwhile.

Cooperative (incremental) rebalancing reclaims only the partitions that genuinely change owner and leaves the rest untouched, minimising the pause.

The more often processes restart, the more that difference shows up as lag.

📍Where It's Used
  • Choosing an assignment strategy for environments with frequent deploys or autoscaling
  • diagnosing rebalance-induced lag
  • and tuning session.timeout and max.poll.interval

03 Frequently Asked Questions

FAQ
What is Why Rebalancing Stalls?+

Whenever a consumer joins or leaves, the partition assignment has to be recalculated. The older protocol (eager) has every consumer give up everything first and then redivide, so partitions that never needed to move stop too. The cooperative protocol revokes only what actually has to move and lets the rest keep reading.

Where is Why Rebalancing Stalls used?+

Choosing an assignment strategy for environments with frequent deploys or autoscaling, diagnosing rebalance-induced lag, and tuning session.timeout and max.poll.interval.

What's a simple analogy for Why Rebalancing Stalls?+

Like redividing warehouse aisles: everyone walks out and files back in, versus only the people who need a different aisle moving. The first way creates a stretch where nobody works.

Guide Progress0%