Re: Optimising Time For Leader Election

2018-12-10 Thread Mayuresh Gharat
Hi Mark, Reducing the zookeeper session timeouts would enable the broker change zookeeper listener on the controller to fire earlier than later. This will enable the controller to detect that the broker is down earlier. Increasing the network threads (processor threads) would not help here, unles

Re: Optimising Time For Leader Election

2018-12-10 Thread Mark Anderson
Mayuresh, Thanks for the details. I'll need to do some more tests to get back with specific numbers re delay and check for timeouts. For now (pre KIP-291 being implemented), the only parameters that will tune leader election will be the zookeeper timeout and increasing the number of network threa

Re: Optimising Time For Leader Election

2018-12-06 Thread Mayuresh Gharat
Hi Mark, The leader election of a new topic partition happens once the controller detects that the Leader has crashed. This happens asynchronously via a zookeeper listener. Once a zookeeper listener is fired, the corresponding object indicating the event happened is put in to a controller queue. T

Re: Optimising Time For Leader Election

2018-12-06 Thread Harper Henn
Hi Mark, If a broker fails and you want to elect a new leader as quickly as possible, you could tweak zookeeper.session.timeout.ms in the kafka broker configuration. According to the documentation: "If the consumer fails to heartbeat to ZooKeeper for this period of time it is considered dead and a