Aditya Kousik created KAFKA-20788:
-------------------------------------

             Summary: Expose Rebalance Cause to RebalanceConsumer and Metrics
                 Key: KAFKA-20788
                 URL: https://issues.apache.org/jira/browse/KAFKA-20788
             Project: Kafka
          Issue Type: New Feature
          Components: clients
            Reporter: Aditya Kousik
            Assignee: Aditya Kousik


A Kafka consumer client today cannot tell why a rebalance happened without 
grepping logs. The rebalance trigger can help with triaging:
 * {{max.poll.interval.ms}} exceeded implies misconfig or delayed poll loop;
 * Member fencing points at session timeout
 * Coordinator-initiated rebalances are regular occurrences due to join and 
leave requests.
 * Application calls to {{Consumer.enforceRebalance()}} are expected and the 
application owns the context.

Existing rebalance metrics describe frequency and latency but carry no cause 
dimension:

{{rebalance-rate-per-hour, rebalance-latency-\{avg,max}, rebalance-total
last-rebalance-seconds-ago, last-poll-seconds-ago}}

A spike in {{rebalance-rate-per-hour}} cannot be narrowed without consumer logs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to