// 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}']

= Replicas

Zookeeper clusters or ensembles usually run with an odd number of nodes and always requires the majority of the nodes to be available in order to maintain a quorum.
Maintaining a quorum is important because when the Zookeeper cluster loses a quorum, it will stop responding to clients.
As a result, a Zookeeper cluster without a quorum will cause the Kafka brokers to stop working as well.
This is why having a stable and highly available Zookeeper cluster is very important for {ProductName}.

A Zookeeper cluster is usually deployed with three, five, or seven nodes.

Three nodes::
Zookeeper cluster consisting of three nodes 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 nodes::
Zookeeper cluster consisting of five nodes requires at least three nodes to be up and running in order to maintain the quorum.
It can tolerate two nodes being unavailable.

Seven nodes::
Zookeeper cluster consisting of seven nodes 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::ref-zookeeper-replicas.adoc[leveloffset=+1]

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