Durable Objects bring stateful primitives to Cloudflare's serverless platform. Each object is a single-threaded actor that can be contacted explicitly, making coordination, chat rooms, and real-time features practical at the edge.
The model is elegant: you define a class extending DurableObject, implementing a fetch handler. When clients need that specific object, they look up its ID—same ID means same instance, guaranteed. This is the key to exactly-once semantics without external coordination.
Initial setup requires careful planning. Decide on your ID strategy—deterministic from user ID, random, or derived. Objects are cheap but not free, and deleting them requires careful handling. For most developers, standard Workers plus D1 or KV are easier starting points.