---
title: "Introducing Zelos: A ZooKeeper API leveraging Delos"
description: "Meta built Zelos, a ZooKeeper-compatible service on top of the Delos replicated-shared-log platform, to replace ZooKeeper clusters whose design ties application state to the ZAB consensus protocol and resists scaling changes."
url: "https://swe.quest/articles/introducing-zelos-a-zookeeper-api-leveraging-delos-60e2ce96bff76564"
canonical: "https://engineering.fb.com/2022/06/08/developer-tools/zelos/"
source: "Meta Engineering"
published: "2022-06-08"
difficulty: "hard"
kind: "Case study"
reading_minutes: 13
tags: ["consensus","distributed-systems","replication","consistency","time-clocks"]
---

# Introducing Zelos: A ZooKeeper API leveraging Delos

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2022-06-08, 13 min read, Case study. Original: [https://engineering.fb.com/2022/06/08/developer-tools/zelos/](https://engineering.fb.com/2022/06/08/developer-tools/zelos/)

## Summary

Meta built Zelos, a ZooKeeper-compatible service on top of the Delos replicated-shared-log platform, to replace ZooKeeper clusters whose design ties application state to the ZAB consensus protocol and resists scaling changes. ZooKeeper's session semantics required new mechanisms. A SessionOrderingEngine speculatively pipelines appends, detects rare reorderings through node and proposal IDs, and reissues commands to keep strict per-session order. A two-level Local/Global Session Manager provides leaderless session leases. TimeKeeper is a tick-based protocol over log positions that detects LSM failure without synchronized clocks. One LSM heartbeat covers all of its sessions, which makes session tracking cheaper than ZooKeeper's per-session leader tracking, and the GSM engine is reusable by other Delos apps.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Consensus](https://swe.quest/tags/consensus.md) (Distributed systems)
- [Distributed systems](https://swe.quest/tags/distributed-systems.md) (Distributed systems)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [Consistency models](https://swe.quest/tags/consistency.md) (Distributed systems)
- [Time & clocks](https://swe.quest/tags/time-clocks.md) (Distributed systems)

## Prerequisites

- state machine replication ([easy posts on Replication](https://swe.quest/tags/replication.md?difficulty=easy))
- ZooKeeper sessions and ephemeral nodes
- linearizability ([easy posts on Consistency models](https://swe.quest/tags/consistency.md?difficulty=easy))
- shared log consensus ([easy posts on Consensus](https://swe.quest/tags/consensus.md?difficulty=easy))

## Keywords

Zelos, Delos, Apache ZooKeeper, ZAB, SessionOrderingEngine, TimeKeeper, SMREngine

## Related posts

- [ClickHouse Keeper: A ZooKeeper alternative written in C++](https://swe.quest/articles/clickhouse-keeper-a-zookeeper-alternative-written-in-c-982cab848c27cdde.md): ClickHouse · 2023-09-27 · Medium · 16 min read · Consensus, Distributed systems, Performance engineering, Analytics & OLAP, C & C++
  ClickHouse Keeper is a C++ drop-in replacement for ZooKeeper with the same client protocol and data model.
- [Bonree replaces ZooKeeper with ClickHouse Keeper for drastically improved performance and reduced costs](https://swe.quest/articles/bonree-replaces-zookeeper-with-clickhouse-keeper-for-drastically-improved-6eee02db0b20c225.md): ClickHouse · 2024-07-22 · Hard · 11 min read · Analytics & OLAP, Consensus, Distributed systems, Observability, Cost optimization
  Bonree migrated the coordination layer of its ClickHouse-based observability platform from five 3-node ZooKeeper clusters to a single ClickHouse Keeper cluster.
- [How we built a general purpose key value store for Facebook with ZippyDB](https://swe.quest/articles/how-we-built-a-general-purpose-key-value-store-for-facebook-with-zippydb-852970eb82fe8238.md): Meta Engineering · 2021-08-06 · Hard · 10 min read · Distributed databases, Replication, Consistency models, Consensus, Multi-tenancy
  ZippyDB is Facebook's largest strongly consistent, geo-distributed key-value store, built by layering a reusable replication library (Data Shuttle) on RocksDB, Shard Manager and a ZooKeeper-based config service.
- [Choosing QuePaxa, an unusual consensus algorithm](https://swe.quest/articles/choosing-quepaxa-an-unusual-consensus-algorithm-8142736b7b34aaea.md): Cloudflare · 2026-11-11 · Hard · 18 min read · Consensus, Distributed systems, Resilience, Replication
  Cloudflare's Meerkat, a globally distributed consensus service for its internal control plane, uses QuePaxa instead of Raft or Multi-Paxos.
- [Deno KV internals: building a database for the modern web](https://swe.quest/articles/deno-kv-internals-building-a-database-for-the-modern-web-61dddae321d95df6.md): Deno · 2023-09-14 · Hard · 10 min read · Distributed databases, Consistency models, Storage engines, JavaScript
  Deno KV's production backend runs on FoundationDB, with a custom "transaction layer" in front of it that handles multi-tenant configuration, JavaScript-native types such as bigint sums, and cross-region replication.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
