# Cloudflare Hyperdrive
[[Cloudflare]] Hyperdrive is a connection pooler and query accelerator for existing [[PostgreSQL]] and [[MySQL]] databases, sitting between [[Cloudflare Workers]] and a regional origin database. It solves the classic "Workers can't open thousands of Postgres connections" problem by maintaining a warm pool of connections to the origin and multiplexing Worker requests over them.
It also caches read queries at the edge — opt-in, with configurable TTL — so common SELECTs are served from cache rather than round-tripping to the origin.
## Why It Matters
Serverless + traditional Postgres has always been awkward: every Worker invocation could open a new TCP connection, exhausting the database's connection limit. Solutions like PgBouncer help, but you have to host them somewhere. Hyperdrive removes that operational concern — pool management is Cloudflare's problem, not yours.
## Common Use Cases
- **Connecting Workers to existing Postgres** (Neon, Supabase, RDS, self-hosted)
- **Reducing latency** for Workers reading from a regional database by caching at the edge
- **Migrating off serverless databases** without rewriting code — point Hyperdrive at any Postgres URL
- **MySQL** workloads with the same shape
## When to Use What
- **[[Cloudflare D1]]**: Cloudflare-native, SQLite, single primary, generous free tier
- **Hyperdrive**: existing Postgres/MySQL, regional origin, want Workers-native access
- **Direct Postgres from Workers**: small workloads, no scaling needs
## References
- Hyperdrive home: https://developers.cloudflare.com/hyperdrive/
- Supported databases: https://developers.cloudflare.com/hyperdrive/configuration/
## Related
- [[Cloudflare]]
- [[Cloudflare Workers]]
- [[Cloudflare D1]]
- [[PostgreSQL]]
- [[Wrangler]]