Why Front migrated from Elasticsearch to ClickHouse for “pixel-perfect” analytics at scale
Front moved customer-facing analytics for 9,000+ B2B companies off a 200-node, 25 TB Elasticsearch cluster and onto ClickHouse Cloud. Per-metric Painless scripts had to be written for every visualization type, so Front replaced them with a single metric-definition framework and a composable AST-based SQL query builder that generates every visualization automatically. The migration dual-wrote events to both systems and compared outputs metric by metric, aiming for zero discrepancies, and VersionedCollapsingMergeTree handles mutable data such as deleted or merged conversations. Front reports a 30-second query that covered 11 days of history now covers 1.5 months on half the machines, and new metrics take a junior engineer three days instead of weeks of senior effort.
Related posts
- Contentsquare Migration from Elasticsearch to ClickHouse
ClickHouse mediumAdept
Contentsquare replaced 14 Elasticsearch clusters with ClickHouse over a phased migration. They first built a new product on ClickHouse, then shadowed production queries endpoint by endpoint to compare results, then moved customers one at a time over six months with zero regressions. The result was 11x lower infrastructure cost, 10x better p99 latency, and longer query windows and retention. Key design pieces were a Kafka-fed ingestion service (clickin) that writes shard-aligned data in ClickHouse native format via clickhouse-local, and an AST-based query optimizer that propagates partition/sort-key conditions and distributed_group_by_no_merge, merges subqueries, and gave a 10x speedup on the slowest 5% of queries.
- 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 HighLevel rebuilt its data platform for speed, scale, and simplicity on ClickHouse Cloud
ClickHouse mediumAdept
HighLevel replaced MySQL, Elasticsearch, Firestore and a document database with ClickHouse Cloud for lead activity, workflow logs, notifications and billing dashboards. Results: an 11 TB MySQL table compressed to 1.3 TB, P99 latency fell from over 6 s to under 200 ms, and a 60 TB Elasticsearch log store shrank to 6.27 TB served by three replicas. Notifications were modeled as MergeTree raw events plus ReplacingMergeTree read/delete state, with argMax instead of FINAL, Bloom filters and two-month partitions. Dashboards moved from daily cron reprocessing to SummingMergeTree materialized views. Key lessons are to model data as immutable, iterate on schemas, use bulk inserts, and instrument the client with per-service query observability.
- 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.
- 100x Faster: GraphQL Hive migration from Elasticsearch to ClickHouse
ClickHouse easyNovice
GraphQL Hive replaced Elasticsearch with ClickHouse for storing per-request GraphQL monitoring data (consumer, requested fields, latency, request body) after query latency degraded with data growth and one large tenant slowed queries for smaller ones. On a 20M-row benchmark where one user owned half the rows, percentile queries took ~10s on Elasticsearch, ~5s on InfluxDB (which struggled with high cardinality), ~3s on TimescaleDB and ~100ms on ClickHouse. Druid was skipped as too complex. Because data had a 30-day TTL, the team dual-wrote to both stores for a month and then switched reads with zero downtime, reporting a 100x average improvement and growth from millions to billions of rows per month. They are now moving to ClickHouse Cloud for sharding and replication.