What problem does it solve?
Durable Objects let you build stateful, coordinated services on Cloudflare’s edge, instead of forcing chat/game/session logic into stateless Workers that lose important coordination state.
Core Features & Use Cases
- Design and routing Durable Objects: Create one Durable Object per coordination “atom” (room, match, user) and use deterministic routing via getByName for consistent behavior.
- State management with SQLite: Use Durable Object SQLite storage for durable primary data, including migrations via wrangler config.
- Concurrency, alarms, and RPC: Apply blockConcurrencyWhile only for initialization, implement RPC methods (instead of fetch handlers), and schedule per-DO work with alarms.
- Testing guidance: Set up and run Durable Object tests using @cloudflare/vitest-pool-workers with unit/integration patterns.
Quick Start
Use the durable-objects skill to implement a stateful chat room Durable Object backed by SQLite and validated by a Vitest suite.