Cloudflare Durable Objects
activeby Cloudflare · since 2020 · also known as Durable Objects, DO
Single-threaded stateful actors at the edge, each with its own strongly consistent SQLite store.
Overview
Durable Objects give each instance of a class a globally unique ID, a single-threaded execution context and its own private storage, now an embedded SQLite database with point-in-time recovery. Because every request for a given object is routed to one place, you get strong consistency and simple coordination without locks: chat rooms, multiplayer game state, rate limiters, collaborative documents and per-tenant databases are the classic uses. WebSocket hibernation keeps idle connections cheap. The model scales by creating many objects, not by making one object big, so throughput per object is limited and data modelling has to follow that.
Strengths & trade-offs
Strengths
- +Strong consistency per object with no locking code: one thread, one owner
- +Each object gets a private SQLite database with transactions and indexes
- +30-day point-in-time recovery for SQLite-backed storage
- +WebSocket hibernation makes real-time apps cheap when idle
- +Alarms API for scheduled per-object work
Trade-offs
- −Throughput per object is bounded by a single thread
- −No cross-object transactions or queries; aggregation needs fan-out
- −Object placement is fixed near first access, so far-away users see extra latency
- −Cloudflare-only programming model
Great for
- +Chat rooms and collaborative editing backends
- +Multiplayer game and session state
- +Rate limiters and distributed counters
- +Per-user or per-tenant databases
- +Coordinating AI agents with durable state
Think twice for
- −Global analytical queries across all data
- −A single very hot entity needing high write throughput
- −Workloads that must run outside Cloudflare
Capabilities
Native or official first-party support · 8 of 25 tracked
Scale & consistency
- Comfortable data size
- Large · ≤ 1 PB
- Horizontal scaling
- Native
- Multi-region
- No
- Transactions
- Full ACID
- Consistency
- Strong
- Schema
- Flexible
- Architecture
- Distributed, Serverless, Embedded
- Query languages
- SQL (SQLite), Storage key-value API
Scales out across millions of independent objects; each object lives in one location (with optional jurisdiction or location hints) and holds up to 10 GB.
Deployment
available on · Cloudflare
Ecosystem
Alternatives to Cloudflare Durable Objects
Globally cached, eventually consistent key-value store for read-heavy data at Cloudflare's edge.
cloudflare-durable-objects vs cloudflare-workers-kv →Serverless SQLite for Cloudflare Workers, priced per row read and written, with read replicas and time travel.
cloudflare-durable-objects vs cloudflare-d1 →Key-value store built into the Deno runtime; its hosted backend ends with Deno Deploy in 2027.
cloudflare-durable-objects vs deno-kv →Managed SQLite-compatible cloud for database-per-tenant apps, with embedded replicas and offline sync.
cloudflare-durable-objects vs turso →In-memory relational database that runs your server logic as WASM modules and streams changes to clients.
cloudflare-durable-objects vs spacetimedb →AWS's serverless key-value and document store with single-digit-millisecond reads at any scale.
cloudflare-durable-objects vs amazon-dynamodb →Cloudflare Durable Objects FAQ
What is Cloudflare Durable Objects?
Cloudflare Durable Objects is a key-value database by Cloudflare, first released in 2020. Durable Objects give each instance of a class a globally unique ID, a single-threaded execution context and its own private storage, now an embedded SQLite database with point-in-time recovery. Because every request for a given object is routed to one place, you get strong consistency and simple coordination without locks: chat rooms, multiplayer game state, rate limiters, collaborative documents and per-tenant databases are the classic uses. WebSocket hibernation keeps idle connections cheap. The model scales by creating many objects, not by making one object big, so throughput per object is limited and data modelling has to follow that.
Is Cloudflare Durable Objects open source?
No. Cloudflare Durable Objects is proprietary, closed-source software.
Does Cloudflare Durable Objects support ACID transactions?
Yes. Cloudflare Durable Objects supports full ACID transactions, with strong consistency.
Does Cloudflare Durable Objects scale horizontally?
Cloudflare Durable Objects scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at large scale (≤ 1 PB).
How can I run Cloudflare Durable Objects?
You can use the vendor's managed cloud, run it serverless and run it at the edge. Managed offerings include Durable Objects. It is available on Cloudflare.
What is Cloudflare Durable Objects best for?
Cloudflare Durable Objects is a strong fit for chat rooms and collaborative editing backends; multiplayer game and session state; and rate limiters and distributed counters. Think twice for global analytical queries across all data.
What are the best alternatives to Cloudflare Durable Objects?
Common alternatives to Cloudflare Durable Objects include Cloudflare Workers KV, Cloudflare D1, Deno KV, Turso and SpacetimeDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is Cloudflare Durable Objects?
Cloudflare Durable Objects ranks #346 of 844 databases on the WhichDB Score (7.2/100), and #48 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.