cloudflare-hyperdrive
Installation
Summary
Connect Workers to PostgreSQL/MySQL with global connection pooling, query caching, and automatic latency reduction.
- Supports PostgreSQL (v9.0-17.x) and MySQL (v5.7-8.x) with node-postgres, postgres.js, and mysql2 drivers; includes Drizzle and Prisma ORM integration patterns
- Eliminates 7 connection round trips via edge pooling near Workers and connection pooling near databases, reducing latency by 90% (March 2025)
- Prevents 11 documented errors including postgres.js hangs with IP addresses, Prisma client reuse causing timeouts, Neon serverless driver incompatibility, and Drizzle with Nitro 3 95% failure rate
- Requires
nodejs_compatflag, TLS/SSL on database, and per-request connection cleanup viactx.waitUntil(); connection pool max must not exceed 5 (Workers limit: 6 connections)
SKILL.md
Cloudflare Hyperdrive
Status: Production Ready ✅ Last Updated: 2026-01-09 Dependencies: cloudflare-worker-base (recommended for Worker setup) Latest Versions: wrangler@4.58.0, pg@8.16.3+ (minimum), postgres@3.4.8, mysql2@3.16.0
Recent Updates (2025):
- July 2025: Configurable connection counts (min 5, max ~20 Free/~100 Paid)
- May 2025: 5x faster cache hits (regional prepared statement caching), FedRAMP Moderate authorization
- April 2025: Free plan availability (10 configs), MySQL GA support
- March 2025: 90% latency reduction (pools near database), IP access control (standard CF IP ranges)
- nodejs_compat_v2: pg driver no longer requires node_compat mode (auto-enabled with compatibility_date 2024-09-23+)
- Limits: 25 Hyperdrive configurations per account (Paid), 10 per account (Free)
Quick Start (5 Minutes)
Related skills
More from jezweb/claude-skills
tailwind-v4-shadcn
|
2.7Ktanstack-query
|
2.5Kshadcn-ui
Install and configure shadcn/ui components for React projects. Guides component selection, installation order, dependency management, customisation with semantic tokens, and common UI recipes (forms, data tables, navigation, modals). Use after tailwind-theme-builder has set up the theme infrastructure, when adding components, building forms, creating data tables, or setting up navigation.
2.5Ktailwind-theme-builder
>
2.2Kfastapi
|
2.0Kcolor-palette
>
1.9K