whatisgithub

What is zookeeper?

apache/zookeeper — explained in plain English

Analysis updated 2026-06-24

12,763JavaAudience · ops devopsComplexity · 4/5LicenseSetup · moderate

In one sentence

A reliable coordination service for distributed systems that helps clusters of computers agree on shared state, elect leaders, and get instant notifications when something changes.

Mindmap

mindmap
  root((repo))
    What it does
      Coordinate clusters
      Store shared state
      Notify on changes
    Use cases
      Leader election
      Distributed locks
      Config storage
    Tech stack
      Java
      Maven
    Distribution
      Apache releases
      Maven Central
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Store cluster configuration that multiple servers need to read and watch for live updates

USE CASE 2

Implement leader election so a distributed cluster automatically picks a replacement when one server fails

USE CASE 3

Coordinate distributed locks so only one worker processes a job at a time

USE CASE 4

Receive instant notifications when a member of a server cluster becomes unavailable

What is it built with?

JavaMavenC

How does it compare?

apache/zookeepernetflix/conductorgoogle/guice
Stars12,76312,77412,744
LanguageJavaJavaJava
Setup difficultymoderatehardmoderate
Complexity4/54/53/5
Audienceops devopsops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Java 8 or later, binary releases available on the Apache website so you do not need to build from source.

Apache 2.0, use, modify, and distribute freely for any purpose, including commercial products.

So what is it?

Apache ZooKeeper is a coordination service for distributed systems. When you have many computers working together as a cluster, they need a reliable way to agree on shared state: which server is currently the leader, what configuration settings are in effect, which jobs are locked by which worker. Without a dedicated tool for this, each team ends up building their own fragile coordination logic. ZooKeeper provides that as a reusable service. You can think of it as a small, highly reliable database that distributed applications use to store coordination data and get notified when something changes. For example, a cluster of servers might all watch a particular entry in ZooKeeper, and when one server becomes unavailable, the others are notified immediately and can elect a replacement leader. ZooKeeper is a foundational piece of infrastructure used inside many large-scale systems. It is written in Java and has been an Apache project for many years. The GitHub repository contains the full source code, and releases are published both on the Apache website and to Maven Central, which is the standard package repository for Java libraries. The README in this repository is brief and mainly points to the project website and wiki for full documentation. Building from source requires Maven and a recent version of Java 8 or later.

Copy-paste prompts

Prompt 1
I have three Java services that need to elect a leader and fail over automatically. Show me how to use Apache ZooKeeper's ephemeral nodes and watches to implement leader election.
Prompt 2
Walk me through starting a single-node ZooKeeper server locally, connecting with the CLI client, creating a znode, and setting up a watch that prints a message when that znode changes.
Prompt 3
My distributed job queue needs to ensure only one worker claims each job. Write a ZooKeeper-based distributed lock in Java using ephemeral sequential nodes.
Prompt 4
Show me how to store application config in ZooKeeper and have multiple running services reload it automatically whenever the config znode is updated.
Prompt 5
How do I configure a ZooKeeper ensemble of three nodes for high availability, and what quorum settings do I need in zoo.cfg?

Frequently asked questions

What is zookeeper?

A reliable coordination service for distributed systems that helps clusters of computers agree on shared state, elect leaders, and get instant notifications when something changes.

What language is zookeeper written in?

Mainly Java. The stack also includes Java, Maven, C.

What license does zookeeper use?

Apache 2.0, use, modify, and distribute freely for any purpose, including commercial products.

How hard is zookeeper to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is zookeeper for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.