ZooKeeper allows creating and configuring a set of ZooKeeper instances to form a cluster.
This cluster is called a ZooKeeper ensemble.
For example, we can have 5 instances of ZooKeeper ("ZK_1", "ZK_2", "ZK_3", "ZK_4", "ZK_5")
that can be parts of the ZooKeeper ensemble.
There's only one leader at a specific time (for example: "ZK_1").
The other ZooKeeper instances (for example: "ZK_2", "ZK_3", "ZK_4", "ZK_5") need to communicate with the ZooKeeper instance leader ("ZK_1") to synchronize their status and data.
Clients (distributed applications) can communicate with any of the ZooKeeper's instances.
For example, clients "C_21" and "C_22" can communicate directly with the ZooKeeper's instance "ZK_2".
Here's an example that shows a possible scenario where multiple clients can communicate with different instances of ZooKeeper:
C_11, C_12, ... <------------> ZK_1 (leader)
C_21, C_22, ... <------------> ZK_2
C_31, C_32, ... <------------> ZK_3
C_41, C_42, ... <------------> ZK_4
C_51, C_52, ... <------------> ZK_5