Vostok.ZooKeeper
  • Overview
  • Quickstart
  • Basics
    • Creating a Client
    • Connecting to a ZooKeeper Cluster
    • Using Client
    • Limitations
  • Operations
    • Common Concepts
    • Creating a Node
    • Deleting a Node
    • Probing Node Existence
    • Getting Children of a Node
    • Getting of a Node Data
    • Setting of a Node Data
  • Observing Node Events
  • Recipes
    • Distributed Lock
Powered by GitBook
On this page

Basics

PreviousQuickstartNextCreating a Client

Last updated 3 years ago

ZooKeeper cluster consists of a tree-like structure of nodes with / as its root. There are two types of nodes: persistent and ephemeral. Once created, persistent node will exist until explicitly deleted. On the other hand, lifetime of an ephemeral node is limited to that of a client-server session within which this node was created.

Only persistent nodes can have children. Any node can also contain (a small amount of) arbitrary bytes as its data.

ZooKeeper client holds a session with servers in cluster that is described by session id and session timeout. Client constantly queries servers to keep the session alive and receive notifications. When backend does not hear anything from a client within the whole session timeout, it considers such session expired.

Creating a Client
Connecting to a ZooKeeper Cluster
Using Client
Limitations