Zookeeper
Explore the Zookeeper distributed coordination service, including its hierarchical API, regular and ephemeral znodes, and how it uses the Zab protocol for leader election and replication. Understand client sessions, watches, sync operations, and compare its approach to other systems like Chubby and etcd. This lesson helps you grasp Zookeeper's design for fast, reliable distributed coordination.
Zookeeper’s API is essentially a hierarchical namespace similar to a filesystem.
Chubby also provides a hierarchical namespace, while etcd provides a key-value interface.
In the illustration below, we can see:
- Every name is a sequence of path elements separated by a slash (/).
- Every name represents a data node (called znode), which can contain a piece of metadata and children nodes.
For example, the node “/a/b” is considered a child of the node “/a”.
Zookeeper’s API operations
The Zookeeper’s API contains basic operations that can create nodes, delete nodes, check if a specific node exists, list the children of a node and read or set the data of a node.
Types of nodes
There are two types of znodes: regular nodes and ephemeral nodes.
-
Regular nodes are created and deleted explicitly by the clients.
-
Ephemeral ...