Durable Objects give you a single-threaded, SQLite-backed actor at the edge with WebSocket hibernation. This post walks through a real-time collaboration counter, shows the billing mechanics, and highlights the trade-offs you'll hit in production.
Use Durable Objects when a single entity needs serialized writes and read-after-write consistency. This note covers trust boundaries, single-region data homing, operational checks, and when to choose KV, R2, or D1 instead.
Durable Objects give serialized, strongly consistent state per ID at the edge. Use them as the owner of one entity, keep state under 10 MB, and verify alarms and ID routing locally with wrangler dev.
Coordinating feature flags at the edge means balancing fast KV reads with eventual consistency. Use Workers KV for low-latency lookups and a Durable Object as an atomic write gate when immediate consistency matters.
Learn how Cloudflare Workers Durable Objects provide strong consistency and low‑latency state for serverless apps, with a concrete counter example and trade‑off discussion.
When building Cloudflare Workers that need persistent state, decide between KV and Durable Objects. This guide compares consistency, latency, storage limits, pricing, and shows how to implement a counter with KV and a WebSocket session with a Durable Object.
Step‑by‑step guide to building a Cloudflare Worker backed by a Durable Object for per‑user session state, including setup, code, local testing, deployment, verification, and rollback.