OpenMeter: Real-time usage-based billing powered by ClickHouse Cloud
OpenMeter, an open-source usage-based metering and billing platform, replaced a Kafka + ksqlDB + Postgres pipeline with Kafka feeding ClickHouse Cloud. The old setup was costly and hard to operate because ksqlDB has no clustering, which forced manual sharding across many instances. The new design uses Kafka for buffering and back-pressure with per-customer topic partitioning, and a modified ClickHouse Kafka Connect Sink for deduplication. ClickHouse materialized views over AggregatingMergeTree tables roll raw events into one-minute tumbling windows and serve as long-term storage. Unlike observability metrics, billing data cannot be sampled or rolled up, so precise dedup and long retention are core requirements.
Related posts
- 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 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.
- Goodbye limitations, hello data: How Qonto is rethinking observability with ClickHouse Cloud
ClickHouse easyNovice
Qonto, a European digital bank, moved trace storage from Grafana Tempo to ClickHouse Cloud, extending query windows from 2-3 hours to two weeks without sampling and adopting a wide-events model instead of the logs/metrics/traces pillars. High-cardinality span and resource attributes compress from 231 TB to 376 GB, saving an estimated $70K a year in S3 costs, so engineers are now encouraged to add attributes freely. Telemetry flows through OpenTelemetry collectors over AWS PrivateLink into ClickHouse, with Grafana for dashboards. An AI incident companion built on the ClickHouse MCP server, behind a roughly 30-line read-only Python layer, lets non-experts investigate incidents and scope affected customers in plain English.
- Why m3ter chose ClickHouse Cloud
ClickHouse mediumAdept
m3ter, a usage-based billing service, picked ClickHouse Cloud for its usage-data plane after proof-of-concept tests against Snowflake, Firebolt, Redshift and Aurora Postgres. Usage events had to stay unaggregated so bills could be recalculated after retrospective config changes. The tests scored each database on ingest rate, deduplication, query concurrency, export, deletion, scalability and cost. ClickHouse delivered 10x ingest, 17x QPS, 11.4x compression, sub-100ms queries (144ms vs Redshift's 3927ms at similar cost) and ~85% cost savings. Its weak spots were deduplication, which relies on background merges or FINAL and so needs pre-insert dedup, and heavier deletes than OLTP stores.
- Scaling our Observability platform beyond 100 Petabytes by embracing wide events and replacing OTel
ClickHouse mediumAdept
ClickHouse's internal LogHouse platform grew from 19 PiB to over 100 PB of uncompressed logs (about 500 trillion rows), mostly by replacing the OpenTelemetry pipeline for ClickHouse server telemetry with SysEx. SysEx is a pull-based Go exporter that copies system tables byte-for-byte from customer pods into LogHouse in ClickHouse's Native format. It assigns pods to scrapers with a hash ring and queries a sliding time window trailing real time by about five minutes, so internal buffers flush before rows are read. Schema drift is handled with hashed, versioned tables unified through the Merge engine. The OTel collectors needed 800+ cores for 2M logs/s and still dropped events, while SysEx ships 37M logs/s on about 70 cores with no edge loss. HyperDX now replaces the team's Grafana-based UI.