// This assembly is included in the following assemblies:
//
// assembly-deployment-configuration-kafka.adoc

// Save the context of the assembly that is including this one.
// This is necessary for including assemblies in assemblies.
// See also the complementary step on the last line of this file.

[id='assembly-zookeeper-replicas-{context}']

= ZooKeeper replicas

ZooKeeper clusters or ensembles usually run with an odd number of nodes, typically three, five, or seven.

The majority of nodes must be available in order to maintain an effective quorum. If the ZooKeeper cluster loses its quorum, it will stop responding to clients and the Kafka brokers will stop working. Having a stable and highly available ZooKeeper cluster is crucial for {ProductName}.

Three-node cluster::
A three-node ZooKeeper cluster requires at least two nodes to be up and running in order to maintain the quorum.
It can tolerate only one node being unavailable.

Five-node cluster::
A five-node ZooKeeper cluster requires at least three nodes to be up and running in order to maintain the quorum.
It can tolerate two nodes being unavailable.

Seven-node cluster::
A seven-node ZooKeeper cluster requires at least four nodes to be up and running in order to maintain the quorum.
It can tolerate three nodes being unavailable.

NOTE: For development purposes, it is also possible to run ZooKeeper with a single node.

Having more nodes does not necessarily mean better performance, as the costs to maintain the quorum will rise with the number of nodes in the cluster.
Depending on your availability requirements, you can decide for the number of nodes to use.

include::../modules/ref-zookeeper-replicas.adoc[leveloffset=+1]

include::../modules/proc-configuring-zookeeper-replicas.adoc[leveloffset=+1]
