During the recent Developer Week 2025, Cloudflare announced the beta of global read replication for its serverless SQL database D1, providing a globally distributed option without sacrificing consistency. With automatically provisioned replicas in every region, applications can now serve read queries faster while maintaining strong sequential consistency across requests.
When replication for a D1 database is enabled, the D1 service maintains read replicas in multiple regions and routes requests to an appropriate copy of the database according to performance heuristics, the type of queries made in those requests, and query consistency needs. In the article “Sequential consistency without borders: how D1 implements global read replication,” Justin Mazzola Paluska and Lambros Petrou explain how the feature was implemented:
D1’s read replication feature is built around the concept of database sessions. A session encapsulates all the queries representing one logical session for your application. For example, a session might represent all requests coming from a particular web browser or all requests coming from a mobile app used by one of your users (…) The sessions implementation ensures sequential consistency for all queries in the session, no matter what copy of the database each query is routed to.
Source: Cloudflare blog
As with any database cluster, read replication on Cloudflare D1 reduces average latency by routing user requests to read replicas in nearby regions and increases overall throughput by offloading read queries to read replicas. In the technical deep dive of the read replication implementation, Paluska and Petrou clarify why there is a need for a Sessions API and why it is not possible to query replicas directly:
D1 runs on Cloudflare’s global network and there’s no way to ensure that requests from the same client get routed to the same replica for every request (…) D1’s read replication is asynchronous, so it’s possible that when you switch between replicas, the replica you switch to lags behind the replica you were using.
The withSession
method takes a bookmark as a parameter, instructing D1 where to forward the first query of the session. While the first-unconstrained
option allows the first query to be processed anywhere, the first-primary
option ensures that the first query of the session will be forwarded to the primary. When possible, the authors suggest continuing sessions across requests by passing previously received bookmarks, allowing all of a client’s requests to be in the same session.
The addition of global read replication to Cloudflare D1 addresses a concern and adds a feature that the community was asking for. In a recent Reddit thread, James Ross, CTO at Nodecraft, wrote:
D1 isn’t that popular today because it has a few gotchas that make it hard to recommend for broader use-cases. (…) It exists in a single region. Their marketing sometimes claim otherwise, and they will hopefully soon get read replicas to improve this, but D1 today is essentially SQLite deployed to a single server.
Read Replication for D1 was just one of the main Cloudflare announcements during Developer Week 2025. As separately reported on InfoQ, the cloud provider launched the public beta of Cloudflare Secrets Store for secure credential management. Furthermore, Cloudflare Snippets and Cloudflare Workflow, a durable execution engine built on top of Workers, are both now generally available. It is also now possible to deploy static sites and full-stack applications on Cloudflare Workers thanks to support for React Router v7, Astro, Vue, and the Cloudflare Vite plugin.
The new read replication feature is currently in beta, with global replica creation and request routing available at no additional cost. The team anticipates additional capabilities in the future, including more advanced replica placement policies.