Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka >> mail # dev >> Random Partitioning Issue

Joe Stein 2013-09-14, 05:11
Joel Koshy 2013-09-14, 12:17
Copy link to this message
Re: Random Partitioning Issue
How about creating a new class called RandomRefreshPartioner and copy the DefaultPartitioner code to it and then revert the DefaultPartitioner code.  I appreciate this is a one time burden for folks using the existing 0.8-beta1 bumping into KAFKA-1017 in production having to switch to the RandomRefreshPartioner and when folks deploy to production will have to consider this property change.

I make this suggestion keeping in mind the new folks that on board with Kafka and when everyone is in development and testing mode for the first time their experience would be as expected from how it would work in production this way.  In dev/test when first using Kafka they won't have so many producers for partitions but would look to parallelize their consumers IMHO.

The random broker change sounds like maybe a bigger change now this late in the release cycle if we can accommodate folks trying Kafka for the first time and through their development and testing along with full blown production deploys.

 Joe Stein
 Founder, Principal Consultant
 Big Data Open Source Security LLC
 Twitter: @allthingshadoop
On Sep 14, 2013, at 8:17 AM, Joel Koshy <[EMAIL PROTECTED]> wrote:

>> Thanks for bringing this up - it is definitely an important point to
>> discuss. The underlying issue of KAFKA-1017 was uncovered to some degree by
>> the fact that in our deployment we did not significantly increase the total
>> number of partitions over 0.7 - i.e., in 0.7 we had say four partitions per
>> broker, now we are using (say) eight partitions across the cluster. So with
>> random partitioning every producer would end up connecting to nearly every
>> broker (unlike 0.7 in which we would connect to only one broker within each
>> reconnect interval). In a production-scale deployment that causes the high
>> number of connections that KAFKA-1017 addresses.
>> You are right that the fix of sticking to one partition over the metadata
>> refresh interval goes against true consumer parallelism, but this would be
>> the case only if there are few producers. If you have a sizable number of
>> producers on average all partitions would get uniform volumes of data.
>> One tweak to KAFKA-1017 that I think is reasonable would be instead of
>> sticking to a random partition, stick to a random broker and send to random
>> partitions within that broker. This would make the behavior closer to 0.7
>> wrt number of connections and random partitioning provided the number of
>> partitions per broker is high enough, which is why I mentioned the
>> partition count (in our usage) in 0.7 vs 0.8 above. Thoughts?
>> Joel
>> On Friday, September 13, 2013, Joe Stein wrote:
>>> First, let me apologize for not realizing/noticing this until today.  One
>>> reason I left my last company was not being paid to work on Kafka nor
>> being
>> able to afford any time for a while to work on it. Now in my new gig (just
>> wrapped up my first week, woo hoo) while I am still not "paid to work on
>> Kafka" I can afford some more time for it now and maybe in 6 months I will
>> be able to hire folks to work on Kafka (with more and more time for myself
>> to work on it too) while we also work on client projects (especially Kafka
>> based ones).
>> So, I understand about the changes that were made to fix open file handles
>> and make the random pinning be timed based (with a very large default
>> time).  Got all that.
>> But, doesn't this completely negate what has been communicated to the
>> community for a very long time and the expectation they have? I think it
>> does.
>> The expected functionality for random partitioning is that "This can be
>> done in a round-robin fashion simply to balance load" and that the
>> "producer" does it for you.
>> Isn't a primary use case for partitions to paralyze consumers? If so then
>> the expectation would be that all consumers would be getting in parallel

Jun Rao 2013-09-15, 03:15
Jay Kreps 2013-09-15, 15:37
Jay Kreps 2013-09-15, 15:45
Joel Koshy 2013-09-17, 17:19
Jay Kreps 2013-09-17, 17:41
Joe Stein 2013-09-18, 23:23
Jun Rao 2013-09-23, 00:57
Joe Stein 2013-09-27, 16:24
Jun Rao 2013-09-27, 16:46
Joe Stein 2013-09-27, 16:54
Jun Rao 2013-09-27, 17:10
Joe Stein 2013-09-27, 17:31
Jun Rao 2013-09-28, 04:12
Guozhang Wang 2013-09-29, 04:52
Jun Rao 2013-09-29, 16:15
Joe Stein 2013-10-01, 05:22
Jun Rao 2013-10-01, 15:27
Joe Stein 2013-10-01, 15:35
Jun Rao 2013-10-01, 16:32