Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 11 min read Case study hardMaster

Bonree replaces ZooKeeper with ClickHouse Keeper for drastically improved performance and reduced costs

Bonree migrated the coordination layer of its ClickHouse-based observability platform from five 3-node ZooKeeper clusters to a single ClickHouse Keeper cluster. The move cut CPU and memory use by more than 75% and improved performance nearly 8x, and it eliminated Java full-GC stalls and replica sync backlogs. The migration was automated with Ansible: ingestion and merges are stopped (e.g. SYSTEM STOP MERGES), fresh snapshots are taken and converted, then data is sampled and verified, bringing a 2-3 hour manual process down to minutes. Bonree also modified clickhouse-keeper-converter to merge snapshots from multiple ZooKeeper clusters into one, handled mixed ACL encryption states, and replaced slow ZooKeeper path reads with a path log, cutting verification of 9 million paths from about 9 hours to seconds.

Assumes: ClickHouse replicated tablesZooKeeper basicsZooKeeper ACLs

Related posts

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

  • How trip.com migrated from Elasticsearch and built a 50PB logging solution with ClickHouse

    ClickHouse mediumAdept

    Trip.com replaced its Elasticsearch-based centralized logging platform with ClickHouse after hitting stability, ingestion and cost limits at 4PB, and has since grown it toward 50PB. The migration used a ReplicatedMergeTree schema with daily partitions, ZSTD codecs, LowCardinality columns, tag key/value arrays and tokenbf_v1 bloom-filter indexes. Kibana was extended with custom ClickHouse panels, and scripts migrated 95% of dashboards automatically. The result was over 50% storage savings and queries 4–30x faster (P90 under 300ms). Further growth caused ZooKeeper-driven DDL timeouts, which led trip.com to split into multiple clusters and to evaluate ClickHouse Cloud with SharedMergeTree.

  • How Lansweeper scaled IT, OT, and IoT insights with ClickHouse Cloud

    ClickHouse easyNovice

    Lansweeper moved its asset-analytics layer from MongoDB plus Elasticsearch to self-hosted ClickHouse and then to ClickHouse Cloud as it grew to 50M assets, 1.4B software records and 5.5B vulnerabilities. Elasticsearch had reached 17% of cloud spend and struggled with frequent large-document updates. ClickHouse on Kubernetes handled updates with an insert-only model: each change or delete becomes a new row, and the latest version is resolved by sort key and timestamp, with data sorted by client and asset key and partitioned by date. ZooKeeper instability drove the move to ClickHouse Cloud, which required only new Kafka consumer credentials, and S3-backed storage cut costs to about 30% of the OpenSearch bill while handling 3x more assets.

  • ClickHouse 22.3 LTS Released

    ClickHouse mediumAdept

    ClickHouse 22.3 is a long-term support release (supported through March 2023) focused on maturity and reliability. ClickHouse Keeper, a Jepsen-tested drop-in ZooKeeper replacement, is now production ready. So are AArch64 builds, which already give better price/performance in major clouds, and MergeTree/ReplicatedMergeTree on S3, though zero-copy replication is not yet ready and GCP has known issues. The release also adds reproducible hermetic builds, X.509 authentication, more fuzzing with randomized settings and backward-compatibility tests, and an experimental JSON type that stores inferred dynamic subcolumns in columnar form. Other changes include up to 2x faster MergeTree inserts, up to 3x faster large IN lists, and a hybrid RAM/disk cache for remote filesystems.

  • Observing in style: How Poizon rebuilt its data platform with ClickHouse Enterprise Edition

    ClickHouse mediumAdept

    Poizon moved its distributed-tracing observability store, which ingests petabytes of trace data daily, from self-hosted single-replica ClickHouse on cloud disks to ClickHouse Enterprise Edition on Alibaba Cloud. The new setup separates storage and compute: SharedMergeTree keeps data in object storage, compute nodes are stateless, and new nodes join via Keeper metadata sync without pausing writes or resharding. Writes are spread across nodes with round-robin, switching to weighted round-robin during restarts, and queries use parallel replicas and tuned ORDER BY keys. Reported results are up to 20M rows/sec ingest, up to 2.5x faster queries in some cases, more than 70% lower storage cost and about 60% lower overall infrastructure cost.

The quest for software engineering knowledge.

Look:
Layout: