Skip to content

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

ClickHouse 3 min read Case study easyNovice

Singapore Meetup Report: How ClickHouse Powers Ahrefs, the World's Most Active Web Crawler

Ahrefs moved its web-crawler and analytics storage from a custom system built on Quantcast File System plus Elasticsearch to ClickHouse in 2019. It now runs hundreds of self-hosted ClickHouse hosts with a geo-replicated main cluster, where replicas are dedicated to read-heavy or write-heavy work and tables hold trillions of rows. The team buffers inserts to cut merge work and uses FETCH/ATTACH to move parts between servers. Ahrefs also upstreamed mark compression, which splits marks into blocks with a custom compression scheme and removes mutexes, cutting mark-cache memory by 3-6x.

Related posts

  • Trillabit Utilizes the Power of ClickHouse for Fast, Scalable Results Within Their Self-Service, Search-Driven Analytics Offering

    ClickHouse easyNovice

    TrillaBit moved its search-driven BI platform from Apache Solr to ClickHouse after Solr proved weak at high-volume aggregation, compression, SQL maturity and joins, and chose ClickHouse over Snowflake on cost and the ability to self-host. The team relies on integration table engines (MySQL/Postgres for metadata lookups, Kafka for streaming IoT data, S3), ReplacingMergeTree to apply delta updates without duplicates, AggregatingMergeTree for incremental aggregation, and views that flatten raw Airbyte JSON with JSON_VALUE. It is now moving to ClickHouse Cloud to offload cluster management. Much of the post is a product pitch for Quick Intelligence's dashboards, embedding and ABAC-based multi-tenancy.

  • Behind the music: How Chartmetric is scaling music analytics with ClickHouse

    ClickHouse mediumAdept

    Chartmetric moved time-series and playlist workloads from Postgres and Snowflake to ClickHouse Cloud, cutting RDS storage from 28 TB to 18 TB and bringing queries that timed out at 60 seconds down to under 3 seconds. Projections, one sorted by recent modification and one by ISRC, fixed hourly sync jobs that had been timing out on tables ordered for API access. Replacing large JOINs with WHERE + IN filters and LIMIT/OFFSET batching cut one query from a 30 GB out-of-memory failure to 98 ms and 300 MB. The playlist cache, built on VersionedCollapsingMergeTree, now holds 5.5B rows in 340 GB, refreshes every five minutes, and answers top-artist queries in about 1.5 seconds versus 20 in Snowflake.

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

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

  • Didi Migrates from Elasticsearch to ClickHouse for a new Generation Log Storage System

    ClickHouse mediumAdept

    Didi replaced Elasticsearch with ClickHouse for petabyte-per-day log and trace storage, cutting machine cost by 30% and speeding up queries about 4x on a 400+ node single-replica deployment peaking at 40 GB/s writes and ~200 QPS. A single Flink write pipeline feeds a Log cluster, and materialized views populate a physically isolated Trace cluster plus AggregatingMergeTree trace index tables, with cold data tiered to HDFS. Schema design rounds log time to the hour as the leading sort key, partitions by day, and moves unfiltered fields into Map columns to limit small files. Operational fixes covered per-table write-node allocation for low-traffic tables, Flink-side throttling, a native TCP Flink connector, and HDFS tiering changes that cut restart time from 1 hour to 1 minute.

The quest for software engineering knowledge.

Look:
Layout: