Skip to content

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

ClickHouse 8 min read Case study mediumAdept

How InMobi achieved 20x faster queries and 80% cost savings with ClickHouse

InMobi moved its publisher-facing real-time ad reporting APIs from a serverless warehouse on blob storage to ClickHouse. P99 latency at peak dropped from over 60s to under 3s, and monthly cost fell from $40K to $8K. The workload is 400K+ daily queries over 10 TB of uncompressed data, which compresses to about 500 GB. Key engineering choices include: - hourly Spark ingestion into staging tables, validated and then promoted atomically via MOVE PARTITION to avoid duplicates from retries - isolated reader and ephemeral writer compute over shared storage - gevent-based async connection handling to fix OOMs caused by per-session memory overhead - automatic fallback to the old platform when failures exceed 2% in a 5-minute window Cost now scales in steps with added replicas, each adding about 30% capacity, rather than linearly with traffic.

Related posts

  • How AdGreetz Processes Millions of Daily Ad Impressions with ClickHouse Cloud

    ClickHouse easyNovice

    AdGreetz moved its ad impression analytics from AWS Athena to Snowflake and then to ClickHouse Cloud, citing roughly six times lower cost than a small Snowflake standard plan and sub-second rather than multi-second queries. The pipeline ingests 5-6 million impressions a day, peaking at 20-30 million, through Cloudflare Workers. The workers acknowledge each event, enrich it in the background, and insert JSON over HTTP using async inserts, so no Kafka buffering layer is needed. Data is partitioned by time, aggregated with materialized views, isolated per customer with filtering views, and served to partners through Metabase dashboards.

  • Why m3ter chose ClickHouse Cloud

    ClickHouse mediumAdept

    m3ter, a usage-based billing service, picked ClickHouse Cloud for its usage-data plane after proof-of-concept tests against Snowflake, Firebolt, Redshift and Aurora Postgres. Usage events had to stay unaggregated so bills could be recalculated after retrospective config changes. The tests scored each database on ingest rate, deduplication, query concurrency, export, deletion, scalability and cost. ClickHouse delivered 10x ingest, 17x QPS, 11.4x compression, sub-100ms queries (144ms vs Redshift's 3927ms at similar cost) and ~85% cost savings. Its weak spots were deduplication, which relies on background merges or FINAL and so needs pre-insert dedup, and heavier deletes than OLTP stores.

  • Migrating to ClickHouse Cloud in just three months with no downtime: A 120 terabyte data journey and its benefits

    ClickHouse easyNovice

    Azur Games moved a 120 TB self-managed ClickHouse 21.3 analytics deployment (45 servers, MinIO, old Airflow) to ClickHouse Cloud on AWS in three months with no analytics downtime. The approach was full duplication, verification, then an atomic switchover. ClickHouse Cloud won over self-managed AWS or bare metal mainly because S3-backed storage with zero-copy replication avoids paying for two full copies of the data. Total cost rose only slightly, but queries ran as fast or faster, Airflow shrank to 24–40 autoscaling vCPUs, and roughly 60% of an admin's and 40% of an ETL engineer's time was freed. Lessons include engineers being pulled onto business work, merge issues found late, and two query-behaviour bugs at cutover.

  • How Buildkite transformed test analytics and cut costs with ClickHouse Cloud

    ClickHouse easyNovice

    Buildkite Test Engine replaced a Kafka/Flink pipeline that pre-aggregated test metrics into Postgres, DynamoDB and Iceberg with on-demand queries against ClickHouse Cloud, letting customers group and filter billions of test executions by arbitrary JSON tags in real time. ClickHouse's JSON type, which creates a column per tag key, and its high ingest rate (25K events/sec sustained, 12B events/month, 70B rows) were the deciding factors over Druid and Pinot. While ingestion quadrupled, net infrastructure spend fell by five figures per month. The savings came from scaling Flink down more than 60%, retiring DynamoDB and halving Aurora capacity, which works out to roughly $8 saved for every $1 spent on ClickHouse.

  • How Rokt Achieved Real-time Reporting with ClickHouse

    ClickHouse easyNovice

    Rokt replaced an Elasticsearch-backed reporting layer with ClickHouse. Elasticsearch lacked flexible group-by and filtering, had no S3 loading or joins, required JSON queries, and forced full re-ingestion whenever a label changed. After ruling out Pinot, Druid, Snowflake, StarRocks and Citus, the team benchmarked ClickHouse against Redshift: ClickHouse was about 3x cheaper, handled up to 200 queries per second with a maximum query time of six seconds, and stored 500 GB of gzipped Parquet in roughly the same space, about one sixth of the Elasticsearch footprint. The current self-managed setup runs ClickHouse in an autoscaling group with ZooKeeper behind network load balancers, and Rokt plans to move to ClickHouse Cloud to offload replication, sharding and backups.

The quest for software engineering knowledge.

Look:
Layout: