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 LinkedIn extended ClickHouse from distributed tracing to metric discovery and analytics

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.

Related posts

  • How Mercado Libre rebuilt its observability platform on ClickHouse Cloud with 75x faster trace queries

    ClickHouse mediumAdept

    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.

  • Building an Observability Solution with ClickHouse at Dash0

    ClickHouse hardMaster

    Dash0 stores all OpenTelemetry metrics, logs and spans in ClickHouse, using PostgreSQL only for customer settings, so signals can be joined and correlated in one system. The setup tiers storage with 1-2 days on local disk, then AWS S3 plus a local cache, driven by TTL moves, and keeps metrics for 13 months. Tables are ordered by a ResourceHash before Timestamp for better filtering and compression, with daily partitions bounding time ranges, and the cluster runs as a single shard with multiple replicas. Metric metadata is deduplicated into an AggregatingMergeTree table keyed by MetricHash with FirstSeen/LastSeen tracking, and queries against it must use GROUP BY or FINAL because merges are not guaranteed to have happened.

  • 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 we made ClickStack 5x faster for ClickHouse observability

    ClickHouse hardMaster

    ClickStack's OpenTelemetry logs schema, inherited from the ClickHouse exporter for the OTel Collector, was reworked through a benchmark-driven process. The changes combined time-bucketed primary key redesign, text indexes, query rewrites, materialized views and newer ClickHouse features, cutting representative observability query latency by more than 5×. Every schema iteration was validated with the ClickCannon tool and ephemeral ClickHouse Cloud instances at 640 MiB/s ingest on three 24-core replicas. Each change was judged against ingestion throughput, CPU, memory, part counts and the full query workload, so a gain on one query pattern could not hide regressions elsewhere.

  • How SolarWinds uses ClickHouse BYOC for real-time observability at scale

    ClickHouse mediumAdept

    SolarWinds ingests about 3 million telemetry messages per second, roughly 550 MB/s with 1 GB bursts, into ClickHouse ReplacingMergeTree tables. Its hottest data, the most recent 60 minutes, suffered when merges lagged behind ingestion. Reducing index granularity, verified by A/B testing a mirrored table through an internal query router, cut five-minute-window query latency from 76 ms to 28 ms. The tradeoffs were primary-key index memory growing from 10 GB to as much as 320 GB and merge times rising nearly 50%. Switching file reads from pread_threadpool to pread on fast SSDs added further gains, and the team moved to ClickHouse BYOC on AWS for S3-backed storage, compute-compute separation and lower operational overhead.

The quest for software engineering knowledge.

Look:
Layout: