[ 
https://issues.apache.org/jira/browse/KAFKA-2397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14731364#comment-14731364
 ] 

Onur Karaman commented on KAFKA-2397:
-------------------------------------

Here's a summary of what I think each approach has to offer over the other.

Pros of LeaveGroupRequest:
1. simplicity. I think the logic is pretty straightforward, keeps the network 
and api layers separated, fits well with existing patterns, and doesn't require 
a complicated refactoring.
2. opens up the possibility for tooling that lets you kick out a consumer and 
trigger a rebalance. This might be a useful admin tool for when things go wrong.
3. opens up the possibility for rolling bounces without triggering a rebalance. 
We can modify the consumer to have a close and closeNow (close sends out a 
LeaveGroupRequest, closeNow doesn't). The application can persist the consumer 
id somewhere. The consumer can initially try out the persisted consumer id 
after it comes back up.

Pros of tcp disconnect:
1. rebalance gets triggered on process death. This would be a con if you want 
the possibility for rolling bounces without triggering a rebalance.

P.S: I'm going to be on vacation from tonight to Tuesday so my responsiveness 
will be a bit spotty from tonight until Tuesday. I think Jiangjie may be in a 
similar situation.

> leave group request
> -------------------
>
>                 Key: KAFKA-2397
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2397
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: consumer
>            Reporter: Onur Karaman
>            Assignee: Onur Karaman
>            Priority: Minor
>             Fix For: 0.8.3
>
>
> Let's say every consumer in a group has session timeout s. Currently, if a 
> consumer leaves the group, the worst case time to stabilize the group is 2s 
> (s to detect the consumer failure + s for the rebalance window). If a 
> consumer instead can declare they are leaving the group, the worst case time 
> to stabilize the group would just be the s associated with the rebalance 
> window.
> This is a low priority optimization!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to