Hi Tomer,

1. Yes, one broker can (will) be a leader for multiple partitions - you'll
usually have a relatively small number of brokers in your cluster, but they
will store data for many topics, with many partitions, so (assuming
auto.leader.rebalance.enable is set to true; I think it's  thedefault in
recent Kafka versions?) the leadership will be split more or less evenly
between all the brokers that given partition is replicated to.
2. No, not for a "healthy" cluster - as soon as such state is "detected"
(e.g. after broker went down), controller should fix it immediately and
"rebalance" the leadership.

MichaƂ

On 4 October 2017 at 14:30, Tomer Shavit <morpash...@gmail.com> wrote:

> Hi,
>
> I have a question regarding kafka. if i have cluster which contains only
> one broker, and i have topic which contains 2 partions. does it mean that
> the same broker will be the leader for those 2 partitions ? can broker be
> the leader for more than one partition ?
>
> Thanks,
> Tomer
>

Reply via email to