back
loading skill details...
|
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_compat flag, TLS/SSL on database, and per-request connection cleanup via ctx.waitUntil(); connection pool max must not exceed 5 (Workers limit: 6 connections) 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)
don't have the plugin yet? install it then click "run inline in claude" again.