Apache ZooKeeper logo

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...

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
SDK
📦
Node.js Client
SDK