cloudflare-hyperdrive

Connect Cloudflare Workers to PostgreSQL and MySQL databases with global connection pooling and query caching.

16|7|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-hyperdrive-jackspace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-hyperdrive
Source: https://github.com/jackspace/ClaudeSkillz/tree/main/skills/cloudflare-hyperdrive
Command: npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-hyperdrive-jackspace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Cloudflare Hyperdrive connects Cloudflare Workers to PostgreSQL and MySQL databases with global connection pooling and edge-enabled query caching, dramatically reducing latency and scaling database access for serverless workloads.

Core Features & Use Cases

  • Global connection pooling to reduce handshake overhead
  • Automatic query caching at the edge for read-mostly workloads
  • PostgreSQL and MySQL support with driver integrations (pg, postgres.js, mysql2)
  • Local development workflow with Wrangler and full edge-ready deployments
  • TLS/SSL configuration and private database access via Cloudflare Tunnel

Quick Start

  1. Create Hyperdrive config with wrangler hyperdrive create <name> --connection-string="<db-conn>"
  2. Bind HYPERDRIVE in wrangler.jsonc and deploy
  3. Use env.HYPERDRIVE.connectionString to query your database from a Worker

Frequently Asked Questions about cloudflare-hyperdrive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a Cloudflare Worker to my PostgreSQL or MySQL database?

Cloudflare Hyperdrive connects Workers to PostgreSQL and MySQL databases using global connection pooling and edge caching. Create a Hyperdrive config with `wrangler hyperdrive create`, bind it in wrangler.jsonc, then query via `env.HYPERDRIVE.connectionString` using supported drivers like pg, postgres.js, or mysql2.

What's the best way to reduce database latency for serverless workloads?

Global connection pooling eliminates repeated handshake overhead, and edge-enabled query caching automatically stores read-mostly results. Hyperdrive applies both strategies across multiple regions, dramatically reducing latency for Cloudflare Workers accessing remote databases.

Can I use Hyperdrive with Prisma ORM or Drizzle ORM?

Yes. Hyperdrive supports driver integrations including Prisma ORM and Drizzle ORM alongside native drivers (pg, postgres.js, mysql2), enabling ORMs to query through the pooled, cached connection layer without modification.

How do I set up private database access with Cloudflare Hyperdrive?

Configure TLS/SSL for encrypted connections and use Cloudflare Tunnel to secure private database access. Hyperdrive's wrangler binding workflow handles the connection setup, allowing Workers to reach on-premises or VPC-isolated databases safely.

What databases does Hyperdrive support for edge workloads?

Hyperdrive connects Cloudflare Workers to PostgreSQL and MySQL databases. It does not support other database engines, but covers the most common relational databases used in production migrations to edge-proxied, cached architectures.

Do I need to modify my application code to use Hyperdrive with Workers?

Minimal changes required. Hyperdrive integrates via standard database drivers (pg, postgres.js, mysql2) and ORMs (Prisma, Drizzle), so existing query logic works unchanged—only the connection string source shifts to the Hyperdrive binding.