Cloudflare explains how D1's control plane runs millions of small databases

Cloudflare detailed how D1 keeps queries off central Postgres while supporting platforms that create a database per user, tenant or preview environment.

Cloudflare has published an engineering deep dive on how D1's control plane supports platforms with "millions of created databases, hundreds of thousands of which are active at any point." Its premise: AI-assisted development and vibe coding platforms push apps toward many small databases, one per user, tenant or preview environment. If you're choosing a backend for an agent-built app, this is a detailed look at that model. It is still one vendor describing its own system.

Cloudflare says each D1 database is backed by one SQLite Durable Object. Queries skip the central Postgres cluster: routing metadata lives in Workers KV, and Postgres, reached through Hyperdrive, handles create, delete and list operations. As of October 8, 2026, Cloudflare reports 15x growth in live databases over one year, 65x over two years, and 18x growth in daily active databases. In its example, wrangler d1 create finished in about 1.6 seconds. An independent walkthrough by Umesh Malik pulls out the reusable patterns, including a single Postgres "checkpoint" write that makes creation safe to retry and a 30-second heartbeat that repairs drift. He notes that heartbeat load grows with the number of active databases.

The D1 limits docs list the practical constraints:

The sources don't show how to run schema migrations across thousands of D1 databases at once. For a comparison, Dbggr's guide points to Neon for real Postgres with copy-on-write branching, and to D1, Turso or Durable Objects where an idle database costs only storage.

Sources