01 / DECISION
When this primitive earns a place
Use Hyperdrive when Workers need PostgreSQL or MySQL and connection setup or repeated safe queries dominate latency.
02 / ARCHITECTURE
Build the smallest defensible path
Bind a least-privilege database user, configure secure connectivity, classify cacheable queries, and tune pooling against real concurrency.
- 01Name the contract
Use Hyperdrive when Workers need PostgreSQL or MySQL and connection setup or repeated safe queries dominate latency.
- 02Add one primitive
Bind a least-privilege database user, configure secure connectivity, classify cacheable queries, and tune pooling against real concurrency.
- 03Capture failure evidence
Compare cold and warm query latency, inspect pool pressure and cache behavior, and test database unavailability plus credential rotation.
03 / REPRODUCE
Evidence before confidence
Compare cold and warm query latency, inspect pool pressure and cache behavior, and test database unavailability plus credential rotation.
npx wrangler hyperdrive list 04 / BOUNDARY
The production boundary
Write latency, transactions, locks, and source-of-truth failure still belong to the database. Do not cache user-specific or volatile queries blindly.
05 / FIRST-PARTY SOURCES
Keep first-party sources authoritative
Product behavior, limits, pricing, and availability can change. Re-check these sources before acting.