How Cloudflare analyzes 1M DNS queries per second
May 10, 2017Marek Vavruša

Summary
This post details the technical evolution of Cloudflare's DNS analytics pipeline. It describes the use of Cap'n Proto for edge log generation, Apache Kafka for buffering, and the adoption of ClickHouse as an OLAP system for storing and querying DNS telemetry data. Key technical details include the ingestion adapter service written in Go, ClickHouse's MergeTree storage engine, columnar storage, sparse indexing, and the careful selection of primary keys for optimized read performance. The post also discusses the challenges of aggregating high-cardinality data and the decision to use materialized views for predefined aggregations.
More from the Data Infrastructure & Analytics trail
- Introducing Cloudflare Basin: an open, serverless data platform, now generally available
- Introducing the Billable Usage API: programmatic cost visibility for Cloudflare
- Announcing the Monetization Gateway: charge for any resource behind Cloudflare via x402
- How we built Cloudflare's data platform and an AI agent on top of it
- Iran's Internet is partially restored, Cloudflare Radar data shows