apache-zookeeperdistributed-systemznodes

Zookeeper Node vs. zNode


I just start reading about zookeeper. And I am getting confused about the data replication and data module.

The ZooKeeper ensemble will contain multiple nodes(Machine) with one leader and others as followers.

The data module is a tree structure with each node as znode.

How does those two structure work together? Is the znode and node refer to the same thing?

I am trying to understand it as each node in ZooKeeper ensemble will have the same data module that contains znode. So the znode is actually, data on nodes. Is that right?


Solution

  • The two concepts don't really relate to each other in any way. A znode is part of the data model. Essentially, it's a path on a tree-like structure that represents a piece of data stored in ZooKeeper. Conversely, a node is a general systems term you could just replace with server.

    Unfortunately, we don't have enough terms in computer science, so terminology can become confusing. But this is simply the difference between a tree node (in the data model) and a cluster node (in the ensemble).