Re: Facing large election time in Kafka

2024-08-23 Thread Divij Vaidya
Hey Atul Leadership information is propagated to the rest of the brokers by the controller. In Zk mode, the controller may take a long time to start up because it needs to fetch all state from Zookeeper. Rolling restart makes it worse because you may end up having controller re-election multiple t

Re: Facing large election time in Kafka

2024-08-23 Thread Atul Sharma
Hi Akash, thanks for the quick reply. By the term leader i mean partition leader. I agree with you as upgrading to Kraft based cluster will help in reducing the partitions leader election time, but as we already have Zookeeper based Kafka cluster upgrading to Kraft based cluster will be bit chal

Re: Facing large election time in Kafka

2024-08-23 Thread Akash Jain
For Kafka with Zookeeper the recovery time is proportional to the number of partitions in the cluster. So theoretically speaking the behaviour is consistent - it will take time. Kraft based Kafka clusters (since Kafka v3.3) are much much better with clusters with a large number of partitions such a

Re: Facing large election time in Kafka

2024-08-23 Thread Akash Jain
HI Atul you use the word 'leader'. You mean the 'controller'? Or you referring to the leader for each of the partitions? On Fri, Aug 23, 2024 at 7:44 AM Atul Sharma wrote: > Hi, > We are currently facing a prolonged leader election time, approx 2 mins, in > a Kafka cluster (version 2.8.2) that i

Facing large election time in Kafka

2024-08-22 Thread Atul Sharma
Hi, We are currently facing a prolonged leader election time, approx 2 mins, in a Kafka cluster (version 2.8.2) that is configured with Zookeeper. This cluster has large number of topic partitions. The issue arises during the rolling restarts of the servers in the Kafka cluster. This extended lea