D1 gets a new storage backend and a look at its future
Cloudflare has rolled out a major update to its D1 serverless database, swapping in a new storage backend that brings significant gains in both query and write performance. Alpha users—which includes anyone with a Workers account—can start using the new backend immediately by creating a new database:
$ wrangler d1 create your-database --experimental-backend
The company says the new backend will become the default for all databases in the coming weeks. For now, existing databases can be migrated by exporting and then re-importing data into a fresh database.
What’s changed under the hood
D1 launched in alpha in November 2022 as Cloudflare’s answer to the demand for a queryable database on its developer platform. Built on SQLite, it offers a familiar SQL dialect and a battle-tested query engine. The alpha was rough around the edges, but developers have since created thousands of databases and issued billions of queries, with ORMs like Drizzle and Kysely adding support and Remix and Nuxt templates building around it.
With the new storage backend, D1 is substantially faster. Cloudflare reports up to 20x speedups on the Northwind Traders Demo, which has been migrated to the new backend:

Write performance also improves. A benchmark inserting 1,000 rows (roughly 200 bytes each) runs about 6.8x faster than the previous version. Jumping to batches of 10,000 rows at the same size yields an even larger improvement—between 10 and 11x—with more consistent latency. Cloudflare notes that write throughput has not yet been optimized, so further gains are expected.
Cloudflare is also positioning D1 against other serverless databases. In a synthetic benchmark querying a 500,000-row key-value table, D1 performed about 3.2x faster than a popular serverless Postgres provider. The Postgres queries were run multiple times to prime the page cache, with median server-side query times reported:

Developer experience upgrades
Alongside the performance work, D1’s developer experience has seen several improvements. A new console interface in the Cloudflare dashboard lets you issue queries directly, inspect tables, and edit data without leaving the browser:

JSON functions are now formally supported, allowing you to query data stored in TEXT columns with SQL before it reaches your application. For example, if you store login timestamps as a JSON array in a login_history column, you can extract sub-objects or array items by path:
SELECT user_id, json_extract(login_history, '$.[0]') as latest_login FROM users
Location Hints are now available too, letting you influence where your database’s leader—responsible for writes—is placed. This is useful if you’re traveling or if the main source of writes comes from a different region than where you typically connect:
# Automatically inferred based your location
$ wrangler d1 create user-prod-db --experimental-backend
# Indicate a preferred location to create your database
$ wrangler d1 create eu-users-db --location=weur --experimental-backend
Location Hints can also be set from the Cloudflare dashboard:

Pricing model revealed
Cloudflare has also shared D1’s planned pricing, though billing won’t be enabled until later this year. Existing users will be notified by email before that happens; until then, D1 remains free. The model is built on reads, writes, and storage, with an always-free tier and usage included in the $5/mo Workers subscription:

Reads are billed per 4KB read unit, and writes per 1KB write unit. A query that scans 10,000 rows of 64 bytes each consumes 160 read units; a 3KB row with lots of Markdown costs three write units. Creating indexes for popular queries reduces both latency and cost. Cloudflare emphasizes that when global read replication arrives, it will not carry extra fees nor multiply storage consumption—replicas are built in.
Pricing is subject to change before billing is switched on, and Cloudflare says it will continue to take feedback until then.
Time Travel: point-in-time recovery
Backups are getting an upgrade too. Time Travel, built into databases using the new storage system, lets you restore your database to any minute within the last 30 days. It works by retaining a stream of all changes via the Write-Ahead Log, then replaying those changes up to the desired point in time.
The benefit is that you no longer need to remember to take manual backups before making risky changes. The feature is designed for those moments when a forgotten WHERE clause turns an UPDATE into a table-wide rewrite. Instead of hoping a scheduled backup ran, you restore to a point just before the mistake.
# Using a precise Unix timestamp (in UTC):
$ wrangler d1 time-travel my-database --before-timestamp=1683570504
# Alternatively, restore prior to a specific transaction ID:
$ wrangler d1 time-travel my-database --before-tx-id=01H0FM2XHKACETEFQK2P5T6BWD
-- Don't do this at home
UPDATE users SET email = '[email protected]' -- missing: WHERE id = "abc123"
Cloudflare is also exploring features to surface larger changes—like schema modifications, table counts, and data deltas—and even specific queries via transaction IDs, to make it easier to pinpoint the right restore time.
What’s on the roadmap
- Open beta: The new storage backend will become the default for
d1 createonce it’s been observed under real-world load. Durability and availability bars must be met first. - Bigger databases: Workers Paid plan users will get access to 1GB databases in the near future, with the per-database cap ramping up over time.
- Metrics & observability: Query volume, failing queries, storage consumed, and read/write units will be available via the dashboard and GraphQL API.
- Automatic read replication: Designed into the new storage subsystem, replication will improve latency by storing copies of data in multiple locations and enable horizontal scaling for larger workloads.
You can start prototyping with D1 today, explore the D1 + Drizzle + Remix example project, or join the #d1 channel on the Cloudflare Developers Discord.



