---
title: "Admixer Aggregates Over 1 Billion Unique Users a Day using ClickHouse"
description: "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."
url: "https://swe.quest/articles/admixer-aggregates-over-1-billion-unique-users-a-day-using-clickhouse-371a80bbeb209b05"
canonical: "https://clickhouse.com/blog/admixer-aggregates-over-1-billion-unique-users-a-day-using-clickhouse"
source: "ClickHouse"
published: "2022-01-11"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["analytics","ads","scalability","data-pipelines"]
---

# Admixer Aggregates Over 1 Billion Unique Users a Day using ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2022-01-11, 8 min read, Case study. Original: [https://clickhouse.com/blog/admixer-aggregates-over-1-billion-unique-users-a-day-using-clickhouse](https://clickhouse.com/blog/admixer-aggregates-over-1-billion-unique-users-a-day-using-clickhouse)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Ads](https://swe.quest/tags/ads.md) (Domains)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)

## Prerequisites

- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- ClickHouse table engines ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- ad tech basics

## Keywords

ClickHouse, AggregatingMergeTree, HyperLogLog, Azure Table Storage, Redis, Kafka, ZooKeeper, Admixer

## Related posts

- [Data Hive: The story of beehiiv’s journey from Postgres to ClickHouse](https://swe.quest/articles/data-hive-the-story-of-beehiiv-s-journey-from-postgres-to-clickhouse-467867cb2bebb87b.md): ClickHouse · 2024-08-21 · Easy · 6 min read · Analytics & OLAP, Databases, PostgreSQL, Stream processing, Queues & messaging
  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.
- [How trip.com migrated from Elasticsearch and built a 50PB logging solution with ClickHouse](https://swe.quest/articles/how-trip-com-migrated-from-elasticsearch-and-built-a-50pb-logging-solution-with-079ade1f405efcf8.md): ClickHouse · 2024-06-12 · Medium · 16 min read · Analytics & OLAP, Observability, Scaling, Cost optimization, Databases
  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.
- [Building a Unified Data Platform with ClickHouse](https://swe.quest/articles/building-a-unified-data-platform-with-clickhouse-cc8bf54cebee136c.md): ClickHouse · 2023-07-28 · Medium · 10 min read · Analytics & OLAP, Databases, Data pipelines, Performance engineering, Go
  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.
- [How Kami scaled from 80M to nearly 2B events per week with ClickHouse](https://swe.quest/articles/how-kami-scaled-from-80m-to-nearly-2b-events-per-week-with-clickhouse-77ce1b06efbf532e.md): ClickHouse · 2025-05-16 · Medium · 7 min read · Analytics & OLAP, Data pipelines, PostgreSQL, Scaling, Schema migrations
  Kami's Postgres event tracking (Rails writing JSONB rows, queried via Redash) collapsed when COVID pushed weekly events from about 80M to nearly 2B.
- [NYC Meetup Report: Large Scale Financial Market Analytics with ClickHouse (Bloomberg)](https://swe.quest/articles/nyc-meetup-report-large-scale-financial-market-analytics-with-clickhouse-269ed023b1feda87.md): ClickHouse · 2022-12-06 · Easy · 3 min read · Analytics & OLAP, Databases, Payments & fintech
  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.

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)
