No more disks: the architecture behind stateless compute in ClickHouse Cloud
ClickHouse Cloud compute nodes are now fully stateless and diskless. The last local dependency, database metadata stored as .sql files, has been removed by a new in-memory Shared database engine backed by a versioned Shared Catalog in Keeper. The architecture got there in stages: SharedMergeTree moved table data to object storage, a distributed cache plus a userspace page cache replaced node-local caching, and the Shared Catalog replaced the Atomic and Replicated database engines. Centralized metadata enables fast bootstrapping without warm-up and DROP operations that don't require every node to be online. It also adds new DDL such as atomic INSERT … SELECT, cross-database RENAME and UNDROP, with selective invalidation of conflicting DDLs instead of a global lock, and extends stateless compute to Iceberg and Delta Lake.
Related posts
- ClickHouse Cloud boosts performance with SharedMergeTree and Lightweight Updates
ClickHouse mediumAdept
SharedMergeTree is a new ClickHouse Cloud table engine that replaces ReplicatedMergeTree (and its zero-copy replication variant) by moving both data and part metadata off the servers into shared object storage and ClickHouse Keeper. Servers become stateless compute nodes: they cache subsets of metadata locally and learn about new parts through Keeper subscriptions rather than a replication log and exclusive locks. New nodes can join almost instantly, and inserts are durable once the part is in object storage and its metadata is in Keeper. This removes the replication-log contention and local-disk dependencies that limited scaling beyond a few replicas. Lightweight updates are introduced alongside and benefit from the shared-metadata design.
- Introducing Warehouses: Compute-compute separation in ClickHouse Cloud
ClickHouse mediumAdept
ClickHouse Cloud Warehouses let multiple services, each with its own endpoint, compute nodes, sizing, idling and network access rules, read and write the same data, isolating workloads such as ingestion, BI dashboards and ad-hoc analysis. Data sharing rests on storage-compute separation over object storage, SharedMergeTree metadata kept in a shared Keeper cluster, and replica groups in the Replicated database that keep distributed queries inside each service. Read-only services skip background merges, so they are fully isolated from write load, while multiple read-write services can still affect each other through merges. The recommended setup is a single read-write service for ingestion with read-only services for everything else. Current limits include a primary service that cannot be idled and DDL that idle services can block (worked around with distributed_ddl_task_timeout=0).
- ClickHouse Keeper: A ZooKeeper alternative written in C++
ClickHouse mediumAdept
ClickHouse Keeper is a C++ drop-in replacement for ZooKeeper with the same client protocol and data model. It adds better snapshot and log compression, no 1 MB node size limit, no ZXID overflow, faster partition recovery, and optional linearizable reads, and it is continuously validated with Jepsen tests. Measurements from loading WikiStat data into a 3-node ClickHouse Cloud service show how cluster size, part-size settings and data volume drive Keeper traffic, about 70% of which is multi-write transactions. A reusable keeper-bench-suite built on EC2, cAdvisor and Prometheus reproduces this workload and finds Keeper uses up to 46x less memory than ZooKeeper with comparable performance.
- Ten years of ClickHouse in open source
ClickHouse easyNovice
ClickHouse marks ten years as open source, with more than 2000 contributors and the stated aim of being a fully open project: public roadmap, CI, code review and a learning resource for C++ and database engineering. It grew out of two custom prototypes for a web analytics system: OLAPServer, a column-per-file store for non-aggregated integer data, and Metrage, a merge tree of CRDT aggregates. Combining columnar storage with background-merged sorted parts and adding SQL produced ClickHouse. It was built from scratch in steps: in-memory columns, aggregate functions, table engines, LZ4 compression, block streams, a recursive descent SQL parser, custom ReadBuffer/WriteBuffer replacing iostreams, MergeTree, and ReplicatedMergeTree on ZooKeeper for multi-DC availability, before being open-sourced in 2016.
- chDB Durable Layer for agent memory
ClickHouse mediumAdept
chDB Durable Layer wraps the embedded chDB (ClickHouse) OLAP engine so a local MergeTree working copy can be published to object storage you own (S3, GCS, Azure) and recovered on another host. Writes stay local until an explicit flush(), checkpoint() folds the statement WAL into a new base snapshot, and a head.json record updated with conditional writes provides a single-writer lease with fencing. It targets agent memory, keeping recall as an in-process query (local was 58x faster than remote in their benchmark) while making state survive ephemeral sandboxes and CI. Recommended practices include append-only versioned memory tables, ZSTD-compressed cold evidence with blobs stored outside the table, flushing at task boundaries, and moving to a server database when multiple writers are needed.