Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the critical path, the most time consuming operation is step 3 where we need to write 1 ZK path per partition. Assuming that during a broker failover we need to change leader for 10K partitions and each ZK write takes 2ms, this could take 20 secs. One possibility is to use the multi() support in ZK 3.4 to batch those writes in 1 ZK operation.

ZKQueue:

Communicating between the controller and the brokers via ZK is not efficient. Each communication requires 2 ZK writes (each costs roughly 2 RPC), 1 watcher firing and 1 ZK read. These add up to roughly 6 RPCs per communication. An alternative is to implement an admin RPC in the broker for direct communication between the controller and the brokers. Then each communication costs only 1 RPC.