grantneale / kafka-lag-based-assignor

Kafka partition assignor that distributes lag evenly across a consumer group
Apache License 2.0
12 stars 5 forks source link

Add property partition.assignment.strategy.max.skew to tune tradoff between even distribution of partition count and even total lag #2

Open grantneale opened 7 years ago

grantneale commented 7 years ago

Add a property partition.assignment.strategy.max.skew with default value 0.

When partition.assignment.strategy.max.skew = 0: the assignor behaves as it does currently, prioritising an even partition count across consumers over an even lag distribution.

When partition.assignment.strategy.max.skew > 0: the assignor prioritises an even total_lag distribution across consumers. To avoid starving some consumers of partitions or skewing the number of partitions per consumer too heavily, this mode should ensure: