README.md

Created about 12 hours ago

attributes
source_pathreferences/hyperdrive/README.md
source_sha256d02307c2b912e2e39f0ca45e5d9ba30878efa6d9974d7afa2ffe4817ff7352ed
source_urlhttps://github.com/cloudflare/skills/blob/47dfc2ce969bf62acf8bc231198ade4bb02712e0/skills/cloudflare/references/hyperdrive/README.md
supporting_skill_id40184
upstream_revision47dfc2ce969bf62acf8bc231198ade4bb02712e0

Hyperdrive

Use Hyperdrive to connect Workers to an existing PostgreSQL or MySQL database with connection pooling and optional query caching. It does not replace the origin database or replicate its data. Start with how Hyperdrive works and supported databases and features to assess fit.

Retrieve current documentation

Fetch the relevant official page before implementing. Driver versions, compatibility settings, API shapes, CLI flags, cache settings, and limits belong in the docs rather than this reference. Use the Hyperdrive documentation index to discover additional pages. Retrieve a page as Markdown by sending Accept: text/markdown to its URL.

Choose the next reference

Task Reference
Create a configuration, bind it, connect privately, or develop locally configuration.md
Choose a driver, use binding credentials, or integrate an ORM api.md
Decide read freshness, connection lifetime, or query placement patterns.md
Diagnose connection, cache, latency, or capacity problems gotchas.md

Decisions to preserve

  • Choose a driver for the database engine and existing application stack; verify supported versions and Worker requirements in its guide.
  • Create database clients inside each handler invocation. Hyperdrive manages the underlying origin pool; consult connection lifecycle for cleanup behavior.
  • Choose caching by read freshness. Disabling caching still allows connection pooling; a write does not invalidate cached reads. See query caching.
  • For multiple sequential queries to one regional database, configure explicit Worker placement matching its provider and region before deployment. Hyperdrive does not automatically place the Worker near the origin. Follow placement setup, preserving explicit user choices.

See also

  • D1 for a managed SQLite alternative.
  • Workers for the runtime and bindings.

Children

No children yet.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.