How Mercado Libre rebuilt its observability platform on ClickHouse Cloud with 75x faster trace queries
Mercado Libre moved the storage layer of its OpenTelemetry-based tracing platform, O11y events, to ClickHouse Cloud. Transformation, filtering and aggregation now run inside the database through materialized views instead of on clients at query time. A ReplacingMergeTree lookup table ordered by attribute key, time buckets, value and trace ID, with a Bloom filter skip index, supports two-step high-cardinality queries against an AggregatingMergeTree trace summary. Queries dropped from over five minutes to about four seconds (75x), compression reached 86–89% on trillions of rows, and throughput is 400M spans/min with only 30% of critical apps migrated. Lessons include benchmarking under real load, iterating on primary keys, tuning batch and async inserts, and separating read, write and merge clusters.
Related posts
- 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.
- How we used ClickHouse to store OpenTelemetry Traces and up our Observability Game
ClickHouse mediumAdept
Resmo stores over 300 million unsampled OpenTelemetry spans per day in a self-hosted ClickHouse node, after dropping S3/Parquet/Athena because of its 2-3 second query startup and delayed data. A single c7g.xlarge with 400 GB EBS holds more than 4 billion spans at about 92% compression (275 GiB vs 3.4 TiB). LowCardinality materialized columns for tenant and user IDs speed up common queries, and joins to Aurora Postgres add account names. The post shares SQL for latency percentiles, SpanAttributes key analysis, spans-per-trace histograms and exception-message search with hasToken.
- How LinkedIn extended ClickHouse from distributed tracing to metric discovery and analytics
ClickHouse mediumAdept
LinkedIn's observability team consolidated a legacy metric metadata system (a custom in-memory search index, a custom KV store and Elasticsearch behind one gateway) onto a single-shard ClickHouse index. The move built on an earlier ClickHouse tracing deployment that ingests ~0.8 trillion spans/day across three data centers using 22-shard clusters, a red-black read/write setup, and tuned sort order, partitioning and Bloom filters. The metadata index uses a replicated ReplacingMergeTree to deduplicate at-least-once change-capture data, daily table rebuilds swapped via alias, projections for heavy aggregations, and per-dimension columns replacing regex over RRD strings. It serves 150k+ queries/minute at 68ms average across 13B+ metrics, with roughly one-fifth the memory and two-thirds the compute of the old stack and headroom to double volume.
- How the D. E. Shaw group powers high-cardinality observability at scale with ClickHouse
ClickHouse mediumAdept
The D. E. Shaw group moved per-task resource metrics from its HPC grid, millions of high-cardinality time series keyed by unique task IDs, from an InfluxDB-protocol time-series platform to ClickHouse. In same-hardware benchmarks, a single ClickHouse node ingested about 3.5M samples/s against roughly 480k for a competitor, and queries that timed out elsewhere finished in seconds. Production keeps the InfluxDB line-protocol ingestion path through a custom batching service, backfills history by reading the old platform's files directly from disk, and stores 68 TB compressed on four replicated NVMe servers at about 530k inserts/s, with materialized views for capacity-planning dashboards. Tradeoffs included rewriting Prometheus-style queries in SQL and limited compression on unique-ID fields (up to 5x), while OpenTelemetry traces reach about 12.5x compression.
- How Respan is scaling LLM observability with ClickHouse Cloud
ClickHouse mediumAdept
Respan, an AI gateway with built-in LLM observability processing about 50 million events per day, moved ingestion and analytics from Postgres to ClickHouse Cloud after per-request transactional inserts began contending at 50-100 writes per second. The ClickHouse design keeps rows small by storing typed metric columns and truncating prompt and output text. Incremental materialized views cascade minute-level rollups into hourly rollups per dimension, while refreshable materialized views update user-metadata joins every 10 minutes. Trace spans arrive asynchronously and are linked to parents at query time, and argMax-style aggregates replace the expensive FINAL modifier so trace analytics stay memory-efficient at billions of rows.