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

Guozhang Wang commented on KAFKA-2400:
--------------------------------------

Hey [~onurkaraman], yeah that is indeed an issue. However after thinking it 
twice I feel for different types of consumer clients these may end up with the 
same effect:

1. Malicious client: a consumer could always claim "my heartbeat frequency is 
X" upon join-group but actually sends a heartbeat every 1ms, for this case I 
think the only shield would be throttling; i.e. protocols between the 
coordinator / consumer does not really help here.

2. Mis-configured client: a consumer could mistakenly config its heartbeat 
frequency too small; the min heartbeat could help in this cases while 
throttling might just result in the same effect.

3. Not-care client: they will not override the defaults at all, so all we need 
to do is to make sure the default values are reasonable.

A side note is that we'd better be careful throttling heatbeats since this 
would possibly increase the false positives of consumer failure if we throttle 
heartbeat the wrong way.

> Expose heartbeat frequency in new consumer configuration
> --------------------------------------------------------
>
>                 Key: KAFKA-2400
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2400
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Jason Gustafson
>            Assignee: Jason Gustafson
>            Priority: Minor
>             Fix For: 0.8.3
>
>
> The consumer coordinator communicates the need to rebalance through responses 
> to heartbeat requests sent from each member of the consumer group. The 
> heartbeat frequency therefore controls how long normal rebalances will take. 
> Currently, the frequency is hard-coded to 3 heartbeats per the configured 
> session timeout, but it would be nice to expose this setting so that the user 
> can control the impact from rebalancing.
> Since the consumer is currently single-threaded and heartbeats are sent in 
> poll(), we cannot guarantee that the heartbeats will actually be sent at the 
> configured frequency. In practice, the user may have to adjust their fetch 
> size to ensure that poll() is called often enough to get the desired 
> heartbeat frequency. For most users, the consumption rate is probably fast 
> enough for this not to matter, but we should make the documentation clear on 
> this point. In any case, we expect that most users will accept the default 
> value.



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

Reply via email to