Admixer Aggregates Over 1 Billion Unique Users a Day using ClickHouse
Admixer's ad exchange ingests about 100 billion records a day, over 1 million inserts per second, into a 15-server ClickHouse cluster after outgrowing MSSQL and the per-transaction pricing of Azure Table Storage. Events flow from request handlers through a custom on-disk queue, chosen to replace Redis and avoid an early Kafka driver array bug, into EventsProcessors. These write via Buffer → Null table → materialized views, and AggregatingMergeTree counts over 1 billion unique UUIDs per day across arbitrary periods and slices. Practical advice includes using HyperLogLog and sampling when exactness isn't needed, load testing before sizing the cluster, inserting in Native format, and watching Buffer memory and too-many-parts merges. Replication is chosen up front: Admixer skipped ZooKeeper and ReplicatedMergeTree and has clients dual-write to two servers.
Related posts
- Data Hive: The story of beehiiv’s journey from Postgres to ClickHouse
ClickHouse easyNovice
beehiiv replaced its Postgres-and-Ruby-queue analytics system, which struggled with billions of email events and had multi-hour reporting delays, with a Kafka-fed ClickHouse Cloud pipeline. The design leans on ReplacingMergeTree for idempotent ingestion and event replay, dictionaries to enrich inserts without joins, ephemeral columns for intermediate calculations, materialized views as pre-aggregated shadow tables with alternate sort keys, and window functions for analytics. After six months the system held over 33 billion raw events in 1.5 TiB compressed (13 TiB uncompressed), with 22 ms median and 85 ms average query times. Creators now see send performance within seconds instead of hours.
- 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.
- Building a Unified Data Platform with ClickHouse
ClickHouse mediumAdept
Synq, a data observability startup, consolidated its user-facing application, internal BI, in-app analytics and ML training data onto a single ClickHouse Cloud cluster after Postgres with a time-series plugin struggled with large backfills. Naive per-message inserts from its Go ingestion service caused part explosions and insert timeouts. Buffer tables fixed that but used too much cluster memory, so the team settled on Async Inserts and handled duplicates with ReplacingMergeTree plus LIMIT 1 BY on a surrogate key. Materialized views feeding query-specific tables with ORDER BY keys matched to access patterns cut scanned data by an order of magnitude and keep API latencies around 100ms, while dbt builds auditing and daily-aggregated analytics tables without separate ETL.
- How Kami scaled from 80M to nearly 2B events per week with ClickHouse
ClickHouse mediumAdept
Kami's Postgres event tracking (Rails writing JSONB rows, queried via Redash) collapsed when COVID pushed weekly events from about 80M to nearly 2B. Read replicas, a message queue and NVMe storage only delayed the problem, and Citus and CDC tools like Debezium could not keep up. The team moved to ClickHouse using a custom Java Kafka consumer that turned JSON into structured columns, plus a manual backfill of historical events. They later added MaterializedPostgreSQL and Kafka syncs for production and CockroachDB CRM data, and built dbt daily per-user rollups that cut DAU queries from 3-4 minutes over 140B rows to about 1 second over 1.3B rows.
- NYC Meetup Report: Large Scale Financial Market Analytics with ClickHouse (Bloomberg)
ClickHouse easyNovice
Bloomberg's Structured Products team uses ClickHouse to power a Terminal application where a few users run interactive filter-and-group queries across roughly 100 million securities. The dataset is about 5 billion rows and 100 columns. Columnar storage keeps rarely used columns available without holding them in memory. The team prioritized ingestion over query speed: they build a new table for each change, such as adding a column, and stage data through buffer tables, which lets them load 4 TB in under an hour while keeping data fresh. Every query puts load on ZooKeeper, a single point of failure the team tests with disaster-recovery drills, and they plan to try Kubernetes, S3-backed storage and ClickHouse Keeper.