Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Consumer Rebalance Storm

A rebalance storm repeatedly interrupts or redistributes work. First identify the group protocol and the event that removes or fences members.

Terminal window
kafka-consumer-groups.sh --bootstrap-server kafka:9092 \
--describe --group orders-consumer --state
kafka-consumer-groups.sh --bootstrap-server kafka:9092 \
--describe --group orders-consumer --members --verbose

Collect client logs from all members, rebalance metrics, poll gaps, callback latency, coordinator request latency, process restarts, and deployment events.

Check:

  • processing or pauses exceed max.poll.interval.ms;
  • heartbeat/session settings are consistent and within broker bounds;
  • GC, CPU throttling, or network loss blocks heartbeats;
  • assignment strategies are compatible across members;
  • group.instance.id is unique for static membership;
  • revocation callbacks finish promptly.

Cooperative assignment reduces full revocation but does not fix member instability.

With group.protocol=consumer, the broker controls heartbeat and session timing. Focus on max.poll.interval.ms, stale/fenced member epochs, coordinator health, broker group configuration, connection churn, and client lifecycle. Do not tune classic-only heartbeat properties expecting an effect.

  • Stop the crash/deploy loop or unhealthy member.
  • Restore the network, coordinator broker, or downstream dependency.
  • Increase max.poll.interval.ms only when long processing is valid and bounded.
  • Make static instance IDs unique and replacements orderly.
  • Standardize protocol and assignment configuration across the group.

The group reaches and remains in a stable state, rebalance rate returns to baseline, all partitions are assigned once, processing resumes, and lag recovers.

Expose poll/rebalance callback latency, failed rebalance count, last rebalance age, process restart count, and coordinator request latency. Roll out group configuration changes compatibly.