Case Study: Cloudflare scaled Zero Trust analytics with TimescaleDB, gaining up to 35× faster queries
Key results
The challenge
Cloudflare needed analytics and reporting for its Zero Trust product suite. It evaluated ClickHouse but found it required 5+ infrastructure components optimized for high-throughput batch writes, which was overkill for an initial MVP. Native PostgreSQL partitioning lacked automatic management and required manual aggregation maintenance.
The solution
Cloudflare adopted TimescaleDB, using automatic partition and retention management, continuous aggregates, columnstore compression with sparse minmax indexes, and real-time aggregates to power its Digital Experience Monitoring (DEX) reporting.
The results, in context
Cloudflare reported query performance improvements of 5× to 35× depending on query type and time window, with pre-computed aggregates contributing up to 1,000× gains for some queries. Columnstore compression reached a 32.83× ratio (1,616 GB down to 49 GB), enabling roughly 33× more data retention at the same cost. A 3-person engineering team delivered the DEX MVP in under four months.