Zookeeper
Let’s explore the Zookeeper’s API for coordination purposes.
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 ...