ZooKeeper
ZooKeeper is a distributed, open-source coordination service for distributed applications. Zookeeper keeps track of the status of the Kafka cluster nodes, and it also keeps track of the Kafka topics and partitions. The ZooKeeper is primarily responsible for managing a Kafka cluster.
For POM High Availability (HA) deployment, Apache Kafka uses ZooKeeper to store cluster metadata.
To run a ZooKeeper service, you must fulfill the contract quorum. The quorum is the minimum number of ZooKeeper services running at a time. According to the contract, to form the quorums, there must be sevaral non-failing machines communicating with one other.
To create a deployment that can withstand the failure of N number of machines, you must deploy (2×N)+1 number of machines. For example, if one ZooKeeper fails to run, another ZooKeeper starts. This behavior also applies to Kafka brokers, where the system is fault tolerant.