You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Joel Koshy (JIRA)" <ji...@apache.org> on 2014/06/19 20:18:25 UTC

[jira] [Commented] (KAFKA-687) Rebalance algorithm should consider partitions from all topics

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

Joel Koshy commented on KAFKA-687:
----------------------------------

Although we are working on the new consumer, some people were interested
(offline) in getting some form of this done in the current consumer at least
for wildcard consumption.  It should (in theory) be simple to do, but may
take a couple days because the wildcard consumption part of the code is
convoluted - mainly because when it was done we did not want to modify the
existing consumer too much.

Anyway, I dumped some thoughts in the comments of this gist:
https://gist.github.com/jjkoshy/5c3d065161153b7b1ee3 and the unit test at
the end provides one possible partition layout strategy.



> Rebalance algorithm should consider partitions from all topics
> --------------------------------------------------------------
>
>                 Key: KAFKA-687
>                 URL: https://issues.apache.org/jira/browse/KAFKA-687
>             Project: Kafka
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Pablo Barrera
>
> The current rebalance step, as stated in the original Kafka paper [1], splits the partitions per topic between all the consumers. So if you have 100 topics with 2 partitions each and 10 consumers only two consumers will be used. That is, for each topic all partitions will be listed and shared between the consumers in the consumer group in order (not randomly).
> If the consumer group is reading from several topics at the same time it makes sense to split all the partitions from all topics between all the consumer. Following the example, we will have 200 partitions in total, 20 per consumer, using the 10 consumers.
> The load per topic could be different and the division should consider this. However even a random division should be better than the current algorithm while reading from several topics and should harm reading from a few topics with several partitions.



--
This message was sent by Atlassian JIRA
(v6.2#6252)