ClickhouseProblem & solution
How Mercado Libre rebuilt its observability platform on ClickHouse Cloud with 50x faster trace queries
Summary
Mercado Libre rebuilt its O11y events observability platform to answer granular business-level questions such as why a payment failed across a large microservice environment. The previous storage-layer design performed transformation, filtering, and aggregation at query time, causing queries to run longer than five minutes and making high-cardinality analysis expensive. The team moved storage to ClickHouse Cloud on AWS while retaining its existing ingestion path, and shifted heavy work into the database with materialized views, layered retention, and a dedicated lookup table for high-cardinality filtering. O11y events uses OpenTelemetry instrumentation with business-flow attributes and samples all traffic for critical applications. The resulting system reduced trace-query time to about four seconds, a 50x speedup, achieved up to 89% compression, and scaled from 7 million to 400 million spans per minute in ClickHouse.
Context
Mercado Libre needed to troubleshoot business flows across its large, multi-language microservice platform, including questions involving specific payment and user IDs. Its previous architecture performed expensive transformations, filtering, aggregation, and metric generation at query time, with queries taking more than five minutes and costs increasing rapidly.
Approach / What changed
The team adopted ClickHouse Cloud on AWS as the storage layer while keeping its applications, SDK, OpenTelemetry collector, stream, and consumer. Materialized views moved transformation, filtering, and aggregation into ClickHouse; raw, span, and metric data use different retention periods; and a dedicated lookup table supports high-cardinality filtering. A read proxy handles rate limiting and access control.
Takeaways
ClickHouse materialized views shifted transformation, filtering, and aggregation from query clients into the database.
O11y events uses a dedicated lookup table for high-cardinality filtering on identifiers such as payment IDs and user IDs.
The platform reports about four-second trace queries, up to 89% compression, and growth from 7 million to 400 million spans per minute in ClickHouse.
Source and freshness
- Source
- clickhouse.com
- Published
- Added to Yomu
- Last updated
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.