Apache ZooKeeper website screenshot

Apache ZooKeeper

Apache ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services for distributed systems. It provides a hierarchical key-value store (znodes), watches for change notifications, ephemeral nodes for presence detection, and sequential nodes for leader election and distributed locking. ZooKeeper exposes a Java/C client API and an HTTP Admin Server API for monitoring and management. It is widely used by Kafka, Hadoop, HBase, Storm, and other distributed systems.

2 APIs 7 Features
Configuration ManagementDistributed CoordinationLeader ElectionService DiscoveryOpen Source

APIs

Apache ZooKeeper Admin Server API

The ZooKeeper Admin Server provides HTTP endpoints on port 8080 that expose the four-letter-word equivalent commands as REST endpoints for cluster monitoring, configuration, and...

Apache ZooKeeper Client API

The ZooKeeper client API provides Java and C language bindings for distributed coordination operations. Operations include create (create znodes), delete, exists (check existenc...

Collections

Pricing Plans

Rate Limits

Apache Zookeeper Rate Limits

5 limits

RATE LIMITS

FinOps

Features

Hierarchical Namespace

Tree-structured znode namespace similar to a filesystem for organized configuration storage.

Watch Notifications

Client watches on znodes trigger one-time callbacks on change events for reactive patterns.

Ephemeral Nodes

Nodes that disappear when the creating client session expires for presence detection.

Sequential Nodes

Auto-incrementing sequential znodes for implementing distributed queues and leader election.

Atomic Operations

Compare-and-set and multi-operation batches for consistent distributed state updates.

ACL Security

Per-znode access control lists for authentication and authorization of znode operations.

Observer Mode

Read-only observer servers for scaling read throughput without affecting write quorum.

Use Cases

Leader Election

Distributed leader election using ephemeral sequential znodes for coordination.

Distributed Configuration Management

Centralized configuration storage with watch-based change notification to services.

Service Registry and Discovery

Service registration and lookup using ephemeral znodes as presence indicators.

Distributed Locking

Distributed mutex and read/write locks using ephemeral sequential znode recipes.

Cluster Coordination

Kafka broker coordination, HBase region server management, and Hadoop NameNode fencing.

Integrations

Apache Kafka

ZooKeeper (legacy) for Kafka broker metadata and controller election (replaced by KRaft).

Apache HBase

ZooKeeper for HBase region server coordination and master election.

Apache Hadoop

ZooKeeper for HDFS NameNode HA fencing and YARN ResourceManager HA.

Apache Storm

ZooKeeper for Storm Nimbus coordination and worker heartbeat tracking.

Apache Solr

ZooKeeper for SolrCloud cluster coordination, configuration, and leader election.

Apache Curator

High-level ZooKeeper client with recipes for common distributed patterns.

API Governance Rules

Apache ZooKeeper API Rules

10 rules · 7 errors 1 warnings 2 info

SPECTRAL

Resources

👥
GitHubRepository
GitHubRepository
🔗
Documentation
Documentation
🌐
Portal
Portal
🚀
GettingStarted
GettingStarted
📄
ReleaseNotes
ReleaseNotes
💬
Support
Support
📜
TermsOfService
TermsOfService
🔗
SpectralRules
SpectralRules
📦
Python Kazoo Client
SDKs
📦
Node.js Client
SDKs

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Apache ZooKeeper Admin Server API
  version: 3.9.0
items:
- info:
    name: Configuration
    type: folder
  items:
  - info:
      name: Apache ZooKeeper Get Server Configuration
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/conf
    docs: Returns details of the current server configuration. Equivalent to the 'conf' four-letter-word command.
  - info:
      name: Apache ZooKeeper Get Server Environment
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/environment
    docs: Returns details of the serving environment. Equivalent to the 'envi' four-letter-word command.
  - info:
      name: Apache ZooKeeper Get Data Directory Sizes
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/dirs
    docs: Shows the total size of snapshot and log files in bytes.
  - info:
      name: Apache ZooKeeper Get Initial Configuration
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/initial_configuration
    docs: Returns the initial configuration text used to start the ensemble.
  - info:
      name: Apache ZooKeeper Get JVM System Properties
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/system_properties
    docs: Returns the JVM system properties.
- info:
    name: Monitoring
    type: folder
  items:
  - info:
      name: Apache ZooKeeper List Client Connections
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/cons
    docs: Returns information about all client connections. Equivalent to the 'cons' four-letter-word command.
  - info:
      name: Apache ZooKeeper Reset Connection Statistics
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/crst
    docs: Resets all connection statistics. Equivalent to the 'crst' command.
  - info:
      name: Apache ZooKeeper List Sessions and Ephemeral Nodes
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/dump
    docs: Lists the outstanding sessions and ephemeral nodes. Equivalent to the 'dump' four-letter-word command.
  - info:
      name: Apache ZooKeeper Get Server Statistics
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/stat
    docs: Lists brief details for the server and connected clients. Equivalent to the 'stat' four-letter-word command.
  - info:
      name: Apache ZooKeeper Get Full Server Details
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/srvr
    docs: Lists full details for the server. Equivalent to the 'srvr' four-letter-word command.
  - info:
      name: Apache ZooKeeper Reset Server Statistics
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/srst
    docs: Resets server statistics. Equivalent to the 'srst' command.
  - info:
      name: Apache ZooKeeper Get Monitoring Metrics
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/mntr
    docs: Returns a list of variables for monitoring the health of the cluster. Equivalent to the 'mntr' four-letter-word
      command.
  - info:
      name: Apache ZooKeeper Get Data Tree Digest
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/hash
    docs: Returns the digest of the data tree.
  - info:
      name: Apache ZooKeeper Get Last Snapshot Info
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/last_snapshot
    docs: Returns information about the last snapshot taken.
- info:
    name: Health
    type: folder
  items:
  - info:
      name: Apache ZooKeeper Health Check
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/ruok
    docs: Tests if server is running in a non-error state. Returns imok if healthy. Equivalent to the 'ruok' command.
  - info:
      name: Apache ZooKeeper Check Read-only Mode
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/isro
    docs: Tests if server is in read-only mode. Equivalent to 'isro' command.
- info:
    name: Watches
    type: folder
  items:
  - info:
      name: Apache ZooKeeper Get Watch Summary
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/wchs
    docs: Returns brief information on watches. Equivalent to the 'wchs' four-letter-word command.
  - info:
      name: Apache ZooKeeper Get Watches by Connection
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/wchc
    docs: Lists detailed information on watches by connection (session). Equivalent to the 'wchc' four-letter-word command.
  - info:
      name: Apache ZooKeeper Get Watches by Path
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/wchp
    docs: Lists detailed information on watches by path. Equivalent to the 'wchp' four-letter-word command.
- info:
    name: Cluster
    type: folder
  items:
  - info:
      name: Apache ZooKeeper Get Current Voting View
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/voting_view
    docs: Returns the current voting members in the ensemble.
  - info:
      name: Apache ZooKeeper Check if Leader
      type: http
    http:
      method: GET
      url: http://localhost:8080/commands/leader
    docs: Returns whether the server is the current leader.
bundled: true