Hyperdrive foundations
Choose Hyperdrive or D1
Keep an existing full database when its features and ownership matter, or choose D1 for a Cloudflare-native SQLite application.
Hyperdrive and D1 both give a Worker a SQL database. That surface similarity confuses people. They answer different questions.
Hyperdrive connects Workers to a PostgreSQL or MySQL-compatible database you already have. The database stays the source of truth. It keeps its extensions, its backups, its location, and its team. Hyperdrive is an accelerator in front of it, not a replacement:
{
"hyperdrive": [
{ "binding": "HYPERDRIVE", "id": "57b7076f58be42419276f058a8968187" }
]
}
D1 is managed SQLite on Cloudflare. There’s no server to run. The database lives inside the platform:
{
"d1_databases": [
{ "binding": "DB", "database_name": "notes-app", "database_id": "f4b1..." }
]
}
The questions that decide it
Don’t choose based on which one is newer. Choose based on schema features, existing data, team operations, latency, migration cost, and consistency.
Do you already have a database? Two years of production Postgres, with backups, dashboards, and a team that knows it, is an asset. Hyperdrive keeps all of it and removes the connection latency. Moving it to D1 means rewriting Postgres-specific SQL for SQLite and re-answering every operational question. “We get to delete Postgres” is rarely worth that bill.
Do you need Postgres features? PostGIS, pgvector, stored procedures, advanced types. SQLite has a smaller surface. If your schema leans on any of these, the decision is made.
Is this a brand-new small app? A notes application with a handful of tables has nothing to migrate and no operations team. D1 wins on ceremony: create the database, write the schema, done. No credentials, no pooling, nothing to patch.
Work through both cases
Take two projects: an existing Postgres SaaS database and a new small notes application. Justify one storage choice for each.
The SaaS database points at Hyperdrive. Real data, real integrations, Postgres features in use. The notes app points at D1. No history, a trivial schema, and the whole operational model disappears into the platform.
If you argued the reverse for either, write down which concrete feature or constraint drove it. That reasoning is what survives a review. The age of the tool is not.
Lesson completed