Does Kafka Need Zookeeper?

Does Kafka Need Zookeeper?
Yes, Zookeeper is must by design for Kafka. Because Zookeeper has the responsibility a kind of managing Kafka cluster. It has list of all Kafka brokers with it. It notifies Kafka, if any broker goes down, or partition goes down or new broker is up or partition is up.

.

Regarding this, how ZooKeeper works with Kafka?

Kafka Architecture: Topics, Producers and Consumers Kafka uses ZooKeeper to manage the cluster. ZooKeeper is used to coordinate the brokers/cluster topology. ZooKeeper is a consistent file system for configuration information. ZooKeeper gets used for leadership election for Broker Topic Partition Leaders.

Furthermore, what happens if ZooKeeper goes down in Kafka? For example, if you lost the Kafka data in ZooKeeper, the mapping of replicas to Brokers and topic configurations would be lost as well, making your Kafka cluster no longer functional and potentially resulting in total data loss.

Similarly, you may ask, what does Kafka store in ZooKeeper?

Basically, Zookeeper in Kafka stores nodes and topic registries. It is possible to find there all available brokers in Kafka and, more precisely, which Kafka topics are held by each broker, under /brokers/ids and /brokers/topics zNodes, they're stored.

What is Apache ZooKeeper used for?

Apache ZooKeeper is used for maintaining centralized configuration information, naming, providing distributed synchronization, and providing group services in a simple interface so that we don't have to write it from scratch. Apache Kafka also uses ZooKeeper to manage configuration.

Related Question Answers

Can we start Kafka without zookeeper?

Kafka 0.9 can run without Zookeeper after all Zookeeper brokers are down. After killing all three Zookeeper nodes the Kafka cluster continues functioning.

What ports Kafka use?

If you are running both on the same machine, you need to open both ports, of corse. kafka default ports: 9092, can be changed on server.

zookeeper default ports:

  • 2181 for client connections;
  • 2888 for follower(other zookeeper nodes) connections;
  • 3888 for inter nodes connections;
Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.