Kafka · Producers & Consumers

Eager vs Cooperative rebalancing

Hardeagercooperativerebalancesticky assignor

Interview question

What is the difference between eager and cooperative rebalancing in Kafka consumers?

How to answer

The short answer

Rebalancing protocols decide how are revoked and reassigned.

Eager rebalance (classic "stop the world")

  • On rebalance, consumers typically revoke all assigned partitions first.
  • Then the group gets a brand-new assignment.
  • Simple mentally, but causes a full pause in processing for the group.
  • More stop-the-world latency during membership changes.

Cooperative rebalance (incremental)

  • Only the partitions that must move are revoked.
  • Consumers can keep working on partitions they still own.
  • Rebalances happen in increments, reducing downtime.
  • Used with cooperative sticky assignors (e.g. CooperativeStickyAssignor).

Why interviewers like this

It shows you know not only that rebalances exist, but that protocol choice affects availability during scaling and rolling deploys.

Practical takeaway

Prefer cooperative sticky assignment for large groups / frequent membership changes, unless you have a reason to stay on an older eager setup.

Interview tip: "Eager = revoke everything; cooperative = revoke only what must move. Cooperative reduces rebalance pause."