# Cloudflare Durable Objects
Durable Objects are [[Cloudflare]]'s primitive for *coordinated, stateful* serverless work on top of [[Cloudflare Workers]]. Each Durable Object is a single-threaded JavaScript instance with its own persistent transactional storage, addressable by a globally unique ID. Cloudflare guarantees that requests for the same ID hit the same instance, which makes them ideal for things that need a consistent serial point of control without standing up a database.
The combination of "exactly one instance per ID" + "transactional local storage" + "global addressability" gives you what is essentially a per-key actor: a tiny coordinator that you can spin up by the millions, each with its own state.
## What Problems They Solve
Traditional serverless functions are stateless and parallel ; whenever you need *one* of something (one chat room's participant list, one user's rate-limit counter, one tenant's queue, one game lobby's tick loop), you end up bolting on Redis, Postgres advisory locks, or message queues. Durable Objects collapse that pattern into the runtime itself: the *object* is the lock, the cache, and the database row.
They are particularly well suited to:
- **[[Rate Limiting|Rate limiting]] and quota enforcement**: per-user / per-org / per-API-key counters with strong consistency
- **Real-time coordination**: chat rooms, collaborative documents, multiplayer games
- **Brokers and schedulers**: hold provider credentials, hand out leases, track concurrency. [[Crabbox]] uses a Durable Object to broker access to ephemeral test runners with TTLs and spend caps
- **Per-tenant isolation**: one Durable Object per customer, naturally bounded blast radius
- **WebSocket fan-out with hibernation**: parked sockets cost nothing until a message arrives
## Storage Model
Each Durable Object has a key/value transactional store accessible only from its own instance. Reads and writes are strongly consistent. Storage is persisted on Cloudflare's distributed disk, geographically near where the Object first runs. SQL-on-DO (SQLite under the hood) gives each Object a private SQLite database, and it's now the default path: since July 9, 2026, new namespaces must use the SQLite backend (accounts that already have a key-value-backed namespace can still create more, for now). SQLite-backed objects keep the key-value API, add SQL queries and point-in-time recovery over the last 30 days, and hold up to 10 GB each. They're also the only kind available on the Workers Free plan.
## Pricing Shape
- **Free plan**: 100,000 requests and 13,000 GB-s of duration per day, 5 GB of storage per account
- **Paid plan**: 1M requests and 400,000 GB-s per month included, then $0.15 per million requests and $12.50 per million GB-s
- Duration is billed only while the object runs or sits in memory unable to hibernate; hibernated WebSockets add no duration charges (their messages still count as requests)
## Why They're Different from Other Actors
Compared to Akka, Orleans, or Temporal: no cluster to operate, no membership protocol to tune, no rebalancing. The Object is born when first addressed, hibernates when idle, and is implicitly co-located with its storage. The flip side: a Durable Object is single-writer ; if you need horizontal write throughput on the same key, this is not the right primitive.
Agents pushed the runtime further in 2026. Outbound connections keep an object alive (June 19), and since October 1, 2026 pending I/O does too: service binding calls, RPC to another Durable Object, `waitUntil()` promises and timers now prevent eviction even when no client is connected (default from compatibility date 2026-10-01). Before that, an agent that kept working after its client disconnected could get shut down mid-task. That's the substrate under [[Cloudflare Agents SDK]], [[Cloudflare Sandbox SDK]] 1.0 and [[Cloudflare Artifacts]] (one repository per object).
## References
- Documentation: https://developers.cloudflare.com/durable-objects/
- WebSocket Hibernation: https://developers.cloudflare.com/durable-objects/best-practices/websockets/
- SQLite Storage API: https://developers.cloudflare.com/durable-objects/api/sqlite-storage-api/
- Pricing: https://developers.cloudflare.com/durable-objects/platform/pricing/
- Limits: https://developers.cloudflare.com/durable-objects/platform/limits/
- Changelog, new namespaces must use SQLite (2026-07-09): https://developers.cloudflare.com/changelog/post/2026-07-09-restrict-new-kv-backed-namespaces/
- Changelog, outbound connections keep objects alive (2026-06-19): https://developers.cloudflare.com/changelog/post/2026-06-19-outbound-connections-keep-dos-alive/
- Changelog, pending I/O keeps objects alive (2026-10-01): https://developers.cloudflare.com/changelog/post/2026-10-01-pending-io-keep-alive/
## Related
- [[Cloudflare]]
- [[Cloudflare Workers]]
- [[Cloudflare Agents SDK]]
- [[Cloudflare Sandbox SDK]]
- [[Cloudflare Containers]]
- [[Cloudflare Artifacts]]
- [[Cloudflare D1]]
- [[Cloudflare KV]]
- [[Wrangler]]
- [[Crabbox]]