Database Reference
In-Depth Information
Updates either succeed or fail. This means that if an update fails, no client will ever see
it.
Single system image
A client will see the same view of the system, regardless of the server it connects to.
This means that if a client connects to a new server during the same session, it will not
see an older state of the system than the one it saw with the previous server. When a
server fails and a client tries to connect to another in the ensemble, a server that is be-
hind the one that failed will not accept connections from the client until it has caught
up with the failed server.
Durability
Once an update has succeeded, it will persist and will not be undone. This means up-
dates will survive server failures.
Timeliness
The lag in any client's view of the system is bounded, so it will not be out of date by
more than some multiple of tens of seconds. This means that rather than allow a client
to see data that is very stale, a server will shut down, forcing the client to switch to a
more up-to-date server.
For performance reasons, reads are satisfied from a ZooKeeper server's memory and do
not participate in the global ordering of writes. This property can lead to the appearance of
inconsistent ZooKeeper states from clients that communicate through a mechanism out-
side ZooKeeper: for example, client A updates znode z from a to a', A tells B to read z,
and B reads the value of z as a, not a'. This is perfectly compatible with the guarantees
that ZooKeeper makes (the condition that it does not promise is called “simultaneously
consistent cross-client views”). To prevent this condition from happening, B should call
sync on z before reading z's value. The sync operation forces the ZooKeeper server to
which B is connected to “catch up” with the leader, so that when B reads z's value, it will
be the one that A set (or a later value).
NOTE
Slightly confusingly, the sync operation is available only as an asynchronous call. This is because you
don't need to wait for it to return, since ZooKeeper guarantees that any subsequent operation will happen
after the sync completes on the server, even if the operation is issued before the sync completes.
Search WWH ::




Custom Search