Home

znodes

In Apache ZooKeeper, znodes are the nodes that form the hierarchical namespace used to store small amounts of data and metadata. Each znode has a path, holds a data payload (as a byte array), and a stat with versioning information. The data payload is limited by a default size of 1 MB.

Znodes come in several flavors: persistent znodes remain until explicitly deleted; ephemeral znodes are tied to

Clients can read and write znode data, check existence, and enumerate children of a znode. The data

ZooKeeper provides a linearizable consistency model and uses a protocol among a quorum of servers to ensure

When a client session ends, all ephemeral znodes created during the session are deleted automatically. Changes

the
client's
session
and
are
removed
when
the
session
ends;
there
are
also
sequential
and
ephemeral-sequential
variants
that
append
a
monotonically
increasing
counter
to
the
znode's
name
on
creation.
and
children
can
be
protected
by
ACLs.
A
znode
can
have
watches
registered
so
clients
are
notified
of
changes
to
data
or
child
lists;
watches
are
one-time
triggers.
that
changes
are
committed
in
order.
Znondes
are
used
for
configuration
management,
naming,
synchronization
primitives
such
as
leader
election,
distributed
locking,
and
service
discovery.
to
data
or
children
increment
version
counters
in
the
znode's
stat,
enabling
clients
to
detect
concurrent
modification.