Performance isolation in a multi-tenant database environment
Aug 26, 2022Justin Kwan, Vignesh Ravichandran

Summary
This post details the challenges and solutions for performance isolation in Cloudflare's multi-tenant Postgres clusters. It describes the problem of tenants contending for shared resources (CPU, memory, disk I/O, database connections) leading to throughput and latency degradation. The post outlines previous manual solutions like connection limits and introduces a new solution involving gateway concurrency throttling at the PgBouncer layer, including runtime commands and open-source contributions. It also explores future solutions like congestion avoidance inspired by TCP Vegas and tenant resource quotas to proactively manage performance and prevent resource starvation.
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