Skip to content

10.10. How do you troubleshoot Kafka Zookeeper connection issues?

Answer: ZooKeeper was historically used by Kafka for cluster metadata and coordination, including controller election, broker registration, and management of partition state. However, current Kafka deployments can run in KRaft mode, where Kafka manages its own metadata quorum instead of depending on ZooKeeper. In an interview, I would explicitly say: ZooKeeper is relevant to older Kafka architectures, while KRaft is the modern direction. If I am troubleshooting an older cluster, I check broker-to-ZooKeeper connectivity, session timeouts, authentication, and whether the brokers can maintain their ZooKeeper sessions. For a new deployment, I would generally prefer KRaft unless there is a specific compatibility reason to use an older ZooKeeper-based setup.

Interview close: I would make the trade-off explicit, measure it, and document the operational impact before deploying it.