Scaling out PostgreSQL for CloudFlare Analytics using CitusDB
Apr 9, 2015Albert Strasheim

Summary
This post details the scaling of Cloudflare's analytics database from a single PostgreSQL instance to a cluster using CitusDB. It outlines the log processing pipeline, including the use of Cap'n Proto, Go, Kafka, and CitusDB. The post explains the rationale behind choosing Go, Kafka, and PostgreSQL, and elaborates on the criteria for scaling PostgreSQL (performance, PostgreSQL compatibility, scaling, high availability, and business intelligence queries). It also describes the CitusDB architecture and the benefits of PostgreSQL extensions like HyperLogLog and Hstore on CitusDB.
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