Build real-time & multiplayer apps without a degree in distributed systems.

Ship multiplayer systems, chat services, session stores and other coordination-heavy apps using Durable Objects.
Stateful serverless

Durable Objects are stateful serverless functions: they run for as long as you need them, can compute in the background, and handle multiple requests concurrently.

WebSockets included

Every Durable Object is also a WebSocket server and client. Broadcast and coordinate state in real-time with just a few lines of code.

Like a micro-VM

Think of every Durable Object as a micro-VM: create thousands (or millions) of them to do work, and throw them away when you're done.

Embedded SQL database

Every Durable Object has a built-in, embedded SQLite database. Serverless doesn't have to be stateless.

Schedule Work

Every Durable Object can do work in the background, periodically poll an API, and programmatically execute code in the future with the Alarms API (it's built-in).

@cloudflare/actors

The @cloudflare/actors library provides a set of powerful abstractions over Durable Objects: the container to Durable Object's micro-VM.

The building block for real-time apps

Power chat rooms, multiplayer sessions, collaborative docs, and live dashboards. Durable Objects run close to users, maintain consistent state, and broadcast updates instantly – no Redis clusters or orchestration required.

Background Pattern
Durable Objects

You can use Durable Objects to:

See real-world examples of Cloudflare Durable Objects

Build chat systems and messaging apps

Build chat systems and messaging apps

One object per chat room handles all messages, user presence, and room state with global consistency. No Redis clusters or message queues required. Try it!
Create collaborative editing experiences

Create collaborative editing experiences

One object per document coordinates real-time edits from multiple users without distributed systems expertise. Think Figma or Google Docs architecture, simplified.
Power multiplayer games and interactive experiences

Power multiplayer games and interactive experiences

One object per game session manages player state, game logic, and real-time updates close to users. Each game room scales independently without infrastructure overhead. Try it!
Coordinate live dashboards and real-time analytics

Coordinate live dashboards and real-time analytics

Objects aggregate and push real-time data updates to connected clients for monitoring and live events. Real-time data without the coordination nightmare.

The simplest way to build real-time systems at global scale

Durable Objects give every developer the building blocks for coordination, state, and real-time communication—without managing Redis, clusters, or distributed locks. Used by teams shipping multiplayer apps, live dashboards, and collaborative editors that just work.

Background Pattern
import { DurableObject } from 'cloudflare:workers';

export default {
  async fetch(request, env) {
    const url = new URL(request.url);
    const counterName = url.searchParams.get('name');
    if (!counterName) return new Response('missing ?name', { status: 400 });

    const counterStub = env.COUNTERS.getByName(counterName);

    let count;
    switch (url.pathname) {
      case '/increment':
        count = await counterStub.increment();
        break;
      case '/decrement':
        count = await counterStub.decrement();
        break;
      case '/':
        count = await counterStub.get();
        break;
      default:
        return new Response('not found', { status: 404 });
    }
    return new Response(`${count}`);
  },
};

export class Counter extends DurableObject {
  async get() {
    return (await this.ctx.storage.get('value')) ?? 0;
  }
  async increment(amount = 1) {
    const newValue = (await this.get()) + amount;
    await this.ctx.storage.put('value', newValue);
    return newValue;
  }
  async decrement(amount = 1) {
    const newValue = (await this.get()) - amount;
    await this.ctx.storage.put('value', newValue);
    return newValue;
  }
}

Durable Objects Pricing

Stateful compute for real-time coordination. View Storage & Data pricing details

Requests

Free

100,000 requests / day

Paid

$0.15 / million requests

Duration

Free

13,000 GB-s / day

Paid

$12.50 / million GB-s

SQL Rows Read

Free

Paid

$0.001 / million rows

SQL Rows Written

Free

Paid

$1.00 / million rows

SQL Stored Data

Free

5 GB

Paid

$0.20 / GB-month

Read Request Units (KV Storage Backend)

Free

Paid

$0.20 / million rows

Write Request Units (KV Storage Backend)

Free

Paid

$1.00 / million rows

Delete Request Units (KV Storage Backend)

Free

Paid

$1.00 / million rows

Stored Data (KV Storage Backend)

Free

1 GB

Paid

$0.20 / GB-month

Liveblocks

Cloudflare released Durable Objects at just the right time for us. Without Cloudflare, hosting WebSocket servers might have required at least four additional people just for management. Using Durable Objects, we can provide serverless capabilities without a dedicated team.

Powerful primitives, seamlessly integrated

Built on systems powering 20% of the Internet, Durable Objects run on the same infrastructure Cloudflare uses to build Cloudflare. Enterprise-grade reliability, security, and performance are standard.

Build without boundaries

Join thousands of developers who've eliminated infrastructure complexity and deployed globally with Cloudflare. Start building for free — no credit card required.