Middle
What is the purpose of ZooKeeper in a Kafka cluster?
sobes.tech AI
Answer from AI
ZooKeeper in a Kafka cluster is used for coordination and management of broker and topic states. It is responsible for storing cluster metadata, electing partition leaders, monitoring broker health, and synchronizing configurations. Through ZooKeeper, Kafka ensures cluster consistency and fault tolerance.
For example, when a broker fails, ZooKeeper helps determine a new leader for partitions to continue message processing without loss.