Durable Objects
ELI5 - The Vibe Check
Durable Objects are like tiny servers that live at the edge and remember things. Normal edge functions are stateless — they forget everything between requests. Durable Objects keep state (in memory AND on disk) and guarantee that only one instance handles requests for a specific entity. Need a real-time counter? A collaborative document? A game server? Durable Objects give you a single point of coordination at the edge without a traditional database.
Real Talk
Durable Objects are a Cloudflare Workers primitive that provides strongly consistent, single-threaded state management at the edge. Each Durable Object is a JavaScript class instance with persistent storage, uniquely addressable by ID, with exactly one active instance globally. They enable coordination patterns (distributed locks, counters, rate limiters), real-time collaboration (WebSocket rooms), and stateful edge applications. They bridge the gap between stateless edge functions and traditional databases.
When You'll Hear This
"Use a Durable Object for the WebSocket room — each chat room is one object." / "Durable Objects give you strong consistency at the edge without a database round-trip."
Related Terms
Cloudflare Workers
Workers run JavaScript at the edge — on Cloudflare's network of 300+ data centers worldwide. Your code executes in milliseconds, right next to the user.
Edge Function
Edge functions run your code at the CDN edge — meaning close to the user, not in some faraway data center.
Serverless
Serverless doesn't mean there are no servers — it means YOU don't have to think about servers. Someone else manages them, scales them, and patches them.
State Management
State management is the answer to where does the truth about what's currently happening in my app actually live, and how does every component find out abou...
WebSocket
WebSocket is like upgrading a walkie-talkie from push-to-talk to a full phone call.