How TimescaleDB helped us scale analytics and reporting

This post details the decision to use TimescaleDB, a PostgreSQL extension, over ClickHouse for the analytics plane of Cloudflare's Digital Experience Monitoring (DEX) product. The author emphasizes simplicity and avoiding unnecessary complexity, advocating for starting with fewer components. The initial DEX architecture used PostgreSQL for configuration and a simple table for logs. When scaling the analytics plane, ClickHouse was considered but deemed overly complex for the MVP's needs (millions of small inserts every 2 minutes). TimescaleDB was chosen as a simpler, more familiar solution that could handle the time-series data effectively within the existing PostgreSQL ecosystem. The post also discusses the importance of multicolumn index order in PostgreSQL for time-series workloads and provides an example of a typical query and the corresponding index design.
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