Sulat.com / Writing on AISaturday, December 5, 2026
Enter →
Developer Tools/5 December 2026

workerd now runs Durable Objects across your own machines

Cloudflare's open-source workerd can cluster Durable Objects on your own machines, with one object store bucket as the only shared service. I ran a three-instance cluster and killed its leader.

3D orange Workers logo beside three server cubes linked to one storage bucket, for workerd Durable Objects clustering
Illustration: Sulat, featuring the Workers logo

At a glance

  • Cloudflare Developers announced experimental clustered Durable Objects in workerd, its open-source Workers runtime.
  • The only shared service is an object store bucket: R2, S3 or GCS.
  • The Deno team that joined Cloudflare in October, and its celld project, are behind the work.
  • In a three-instance run on one machine, a clean stop handed an object over in 0.16 seconds, while a crash took 21.6 seconds.
  • KV and Queues don't work in a cluster yet, and traffic between instances isn't encrypted.
  • I didn't run it against a real bucket or on separate machines.

Cloudflare Developers has announced that workerd, the open-source runtime behind Cloudflare Workers, can now run Durable Objects as a cluster across machines you own. The only shared service is an object store bucket. The feature is experimental. I installed workerd, started three clustered instances against a local S3 stand-in, and killed the one leading an object to see what happens.

Cloudflare Developers announces self-hosted Durable Objects in workerd on X.

The post lists what workerd has now: experimental Durable Object clustering backed by a bucket (R2, S3 or GCS), direct support for a wrangler.json file, and an official cloudflare/workerd Docker image. It credits the Deno team, which joined Cloudflare in October, and a project called celld that is being folded into workerd.

The page behind the post, workerd.dev, also drew a reaction from deekay (@flexdinesh), who wrote that he finally understood Durable Objects and credited whoever wrote the page. His version of the mental model fits the docs closely.

deekay (@flexdinesh) on the workerd.dev page.

This is the only way I understand Durable Objects – RWX storage or object store with synchronous reads and writes over a stable identity.

deekay (@flexdinesh) on X

What changed

Until now workerd could run Durable Objects on one instance only. Kenton Varda of Cloudflare said so plainly when the Deno team joined, in Cloudflare’s post on the deal.

Workerd implements them, but only in a single-instance way, good enough for local testing, but unable to scale.

Kenton Varda, Cloudflare

Cloudflare’s own routing for Durable Objects is built for hundreds of locations and leans on services run by site reliability engineers, so it was never going to be something a self-hoster could run. Ryan Dahl’s Deno team had already built celld, released in August, as one Rust binary whose only external dependency is object storage. In October the team joined Cloudflare, and Dahl and Bert Belder now lead the effort to bring celld’s code and ideas into workerd. I covered the Deno announcement at the time, including the six-month end date for Deno Deploy.

Varda also took on the lock-in argument in that post. He says workerd is the same code Cloudflare runs in production, and that when Cloudflare pitched Workers for Platforms to customers like Shopify in 2022, they told it they couldn’t build on Workers unless the runtime was open source. Durable Objects were the hole in that argument, which he calls workerd’s “one big gap in its production-readiness”.

What a Durable Object is

workerd.dev describes a Durable Object as a small named server that owns one piece of state, such as a user, a document or a chat room. Asking for the same name always reaches the same object. Each one has its own SQLite database with synchronous reads and writes, runs its code on a single thread, can hold WebSocket connections, and leaves memory when it’s idle. That last part is why deekay’s summary works: the name is the stable identity, and the database is the storage that sits next to the code.

Infographic: a Durable Object has one name, its own SQLite database and one thread with no locks
A Durable Object is a small named server that owns one piece of state. Illustration: Sulat

Cloudflare’s documentation places the design in the actor-model family and names Erlang, Elixir, Akka and Microsoft Orleans as other examples. The practical difference is where it ran. Orleans and Akka are libraries you host. Durable Objects ran only inside Cloudflare’s network, apart from the single-instance version in workerd. I looked at the same idea from the agent side when Cloudflare ran Codex on Durable Objects.

How the cluster works

A cluster is several workerd instances pointed at the same bucket. There is no join step. Each instance writes a lease to the bucket with its address and an expiry 20 seconds out, renews it every few seconds, and lists the other leases every three seconds. The first instance to get a request for an object claims it with a conditional write, and the others forward that object’s requests to it.

Infographic: run workerd on each machine, point them at one bucket, the bucket decides who leads each object
A cluster is workerd instances plus one bucket. Illustration: Sulat

The bucket does the coordination, so it has to be strict. workerd needs four things from it:

  • A conditional create that fails when the key already exists.
  • A conditional overwrite that fails when the key has changed since the read.
  • A read after a write that returns that write.
  • A list after a write that includes the new key.

R2 and S3 provide all four. Google Cloud Storage ignores If-Match on a PUT, so workerd uses its generation preconditions through a gs:// URL instead. Azure Blob Storage isn’t supported. Each instance runs a probe against the bucket before it serves, and no setting turns that test off.

Each object has a leader record with a fencing epoch. Every commit goes to the bucket under the current epoch, and a new leader starts a new epoch from a snapshot, so a late write from an old leader lands where nothing reads it. A write is acknowledged only after the upload finishes and the leader record still names the instance that made it. Reads, errors and outbound calls that could expose an unconfirmed write are held the same way.

Four hand-drawn steps: commit locally, upload to bucket, check leader record, then reply to the caller
A write is acknowledged only after the bucket holds it and the leader record still names the instance. Illustration: Sulat

The cost is latency. Every write waits for at least one upload to the bucket. The docs report about half a second per write in a test from virtual machines in Los Angeles against R2.

What I ran

I ran this on a cloud virtual machine with 4 vCPUs (Intel Xeon at 2.10 GHz), 15 GiB of memory and a 252 GB disk, on Ubuntu 24.04.5 with kernel 6.18 and Node 22. workerd was version 2026-12-02 from npm. I had no R2, S3 or GCS credentials, so the bucket was a local S3 server (moto 5.2.6). It enforces If-None-Match, workerd’s startup test accepted it, and all three instances reported ready. That makes this a test of workerd’s clustering logic on one machine over loopback, not of a real network or a real bucket.

The Worker is the counter from the workerd docs, unchanged: each name gets its own Durable Object, which counts requests in SQLite. A single instance first. I called alice twice and bob once, stopped workerd, started it again, and called alice a third time. She was at 3, so the state survives a restart. Then I made three copies of the project and started one instance in each:

Code
export AWS_ENDPOINT_URL=http://127.0.0.1:5555
export AWS_REGION=us-east-1
export AWS_ACCESS_KEY_ID=test
export AWS_SECRET_ACCESS_KEY=test
export WORKERD_CLUSTER_BUCKET=s3://workerd-cluster/counter
export WORKERD_CLUSTER_KEY=$(openssl rand -hex 32)

npx workerd serve --experimental . --cluster-addr 127.0.0.1:7001 -s http=127.0.0.1:8781
npx workerd serve --experimental . --cluster-addr 127.0.0.1:7002 -s http=127.0.0.1:8782
npx workerd serve --experimental . --cluster-addr 127.0.0.1:7003 -s http=127.0.0.1:8783

Calling alice through the first, second, third and first instance returned 1, 2, 3 and 4, so the count followed the object regardless of which instance took the request. bob, first called through the second instance, counted 1, 2 and 3 across the second, third and first.

Terminal showing three workerd instances sharing one counter, a clean handoff and a crash recovery
Condensed from my terminal runs: three instances, one object, a clean stop and a crash.

A clean stop against a crash

The docs say an instance stopped with SIGTERM hands its objects to the others, while one that is killed leaves them unavailable until its lease expires. I tested both on the instance that led alice.

After SIGTERM, the next call to alice through a different instance came back in 0.16 seconds with the count continuing at 25. The stopped instance had exited by the time I looked nine seconds later. Then I sent SIGKILL to the new leader and called alice through the third instance every second with a five-second timeout. The calls failed at 5.0, 11.0 and 17.1 seconds. The fourth succeeded at 21.6 seconds with the count continuing at 26. That matches the docs’ lease of about 20 seconds, and the count carried on from where it was.

Hand-drawn comparison: clean stop served the next call in 0.16 seconds, a crash took 21.6 seconds
After a clean stop the next call was served in 0.16 seconds; after a crash it took 21.6 seconds. Illustration: Sulat

The takeaway for anyone running this is in the docs’ own wording: Ctrl-C counts as a crash, so use SIGTERM to stop an instance, and put each one under a supervisor that restarts it.

What the local numbers show

Twenty writes to alice through an instance that wasn’t her leader had a median of 7.4 ms, against 1.4 ms for twenty writes to a single instance with no cluster. Both ran over loopback to a local bucket, so the gap shows the extra forward and upload step and says nothing about real-world latency. The half-second figure from the docs is the one to plan around for R2.

What workerd refuses to start with

The docs say workerd refuses configuration it doesn’t support rather than ignoring it. I tried three cases and each refusal was immediate:

  • A config with kv_namespaces and --cluster-addr: “A config that joins a cluster with –cluster-addr cannot have kv_namespaces yet.”
  • A config with account_id: “unknown field `account_id`”, followed by the list of keys it accepts.
  • Clustering without --experimental: “Cluster mode is experimental; it requires –experimental.”

What it doesn’t do yet

The Limitations page lists what separates this from a production platform. A cluster runs one application. KV and Queues don’t work in a cluster yet, and workerd doesn’t move objects to balance load, so an object stays on the instance that first activated it until that instance stops. When an object changes hands, its WebSocket connections close and the clients have to reconnect. Each instance runs JavaScript on one thread, so it uses one CPU core, and you add cores by adding instances.

Hand-drawn checklist of workerd cluster limits: KV and Queues, object balancing and encrypted traffic are not supported
What a workerd cluster doesn’t do yet, from its Limitations page. Illustration: Sulat

The security notes matter more. workerd isn’t a hardened sandbox, and the docs tell you to run untrusted code in a virtual machine. One cluster is one trust domain. Traffic between instances is authenticated with a key but not encrypted, so the cluster port belongs on a private network, and the bucket credentials give full control of every object. workerd refuses a public IP address as a cluster address. Changing the cluster key means stopping every instance.

Outside the cluster, the compatibility page marks Workers, Durable Objects and Facets as supported. KV, Queues, D1, R2, Workflows and static assets are experimental. Workers AI, Vectorize, Containers, Browser Rendering and Email Workers aren’t available.

Where this sits

OptionWhere it standsWho built it
workerd, one instanceDurable Objects for local testing, no scalingCloudflare
celldOne Rust binary plus an object store bucket, released in AugustDeno team, now at Cloudflare
workerd clusterExperimental, bucket-backed, merging celld’s ideasCloudflare with Dahl and Belder
Durable Objects on CloudflareProduction routing across Cloudflare’s networkCloudflare
Sources: Cloudflare’s Deno post and the workerd docs.

The pitch is portability. An app written against Durable Objects can now run on a handful of Linux boxes and a bucket, which is the answer to the lock-in complaint that Varda set out to rebut. The trade-off is that you take on the operations: leases, clock sync, restarts and a private network. The Docker image helps with packaging, and the docs include a Kubernetes guide for GKE with a GCS bucket and for EKS with S3.

What I didn’t run

I didn’t run workerd against R2, S3 or GCS, on separate machines or across a network. I didn’t run the Docker image, because the VM has no Docker daemon, though Docker Hub lists cloudflare/workerd for amd64 and arm64 with a build pushed on 3 December. I didn’t test WebSockets, alarms, the Kubernetes guide or a rolling upgrade. The numbers above come from one machine over loopback.

Sources and further reading: