ClickhouseClickHouseProblem & solution
Why Front migrated from Elasticsearch to ClickHouse for “pixel-perfect” analytics at scale
Summary
Front migrated from Elasticsearch to ClickHouse Cloud to power customer-facing analytics across tens of millions of messages per day for over 9,000 B2B companies. With Elasticsearch, adding a single new metric took a senior engineer several weeks due to the complexity of Painless scripting. In ClickHouse, a junior engineer implemented the first metric in three days using a single framework that defines each metric once and automatically generates all visualizations. For one enterprise customer, a 30-second query that returned 11 days of data in Elasticsearch now returns 1.5 months of data in ClickHouse with half the machines. The team used ClickHouse’s VersionedCollapsingMergeTree engine to maintain pixel-perfect accuracy with mutable data such as deleted messages or merged threads.
Context
Front is a B2B customer service platform handling tens of millions of messages per day for over 9,000 companies. By late 2025, it was running 25 TB of analytics data across 200 Elasticsearch nodes. Adding a single new metric took a senior engineer several weeks due to Elasticsearch’s Painless scripting language, which required separate implementations for each visualization type. The analytics team wanted to enable any developer to create metrics without being a bottleneck.
Approach / What changed
Front migrated from Elasticsearch to ClickHouse Cloud by running both systems in parallel, inserting every new event into both simultaneously and comparing outputs metric by metric. The primary architectural shift was building a single framework that defines each metric once, with a custom ClickHouse query builder that assembles optimized SQL from modular components. The team used ClickHouse’s VersionedCollapsingMergeTree engine to handle mutable data changes over time.
Takeaways
Front migrated from 200 Elasticsearch nodes running 25 TB of analytics data to ClickHouse Cloud, reducing metric development time from several weeks for a senior engineer to three days for a junior engineer.
ClickHouse’s SQL compatibility and composable query builder allowed Front to define each metric once in a single framework that automatically generates all visualizations, eliminating the need for separate Painless scripts per visualization type.
For one large customer, a 30-second query in Elasticsearch returned 11 days of data; the same query in ClickHouse returns 1.5 months of data using half the number of machines of equal performance.
FAQ
How does ClickHouse handle mutable data for pixel-perfect accuracy?
Front used ClickHouse's VersionedCollapsingMergeTree engine, which tracks and reconciles data changes over time to ensure every number a customer sees is exact, even when messages are deleted or threads are merged.
How much faster is metric development in ClickHouse?
A junior engineer implemented the first metric built entirely within the new ClickHouse framework in three days, compared to the several weeks it would have taken a senior engineer in Elasticsearch.
What performance improvement did ClickHouse provide for a large customer?
For one large customer, a 30-second query in Elasticsearch returned 11 days of data; the same query in ClickHouse returns a month and a half of data in the same time window, using half the number of machines of equal performance.
Source and freshness
- Source
- clickhouse.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.