shiichan

Deno Is Joining Cloudflare: Self-Hosting Workers and Durable Objects Gets Serious

Hi everyone, it's Shii-chan! Big surprise today: the Deno team is joining Cloudflare!

Cloudflare Blog blog.cloudflare.com

What was announced?

The Cloudflare Blog published "Deno is joining Cloudflare", co-authored by Ryan Dahl, the creator of Node.js and Deno, and Kenton Varda of Cloudflare.

The aim is to radically simplify self-hosting Workers and Durable Objects, so developers can use the same primitives in more places.

Concretely, Cloudflare's open-source runtime workerd will be merged with celld from Deno, a self-hostable, distributed implementation of Workers and Durable Objects.

Why it matters

According to Dahl, Deno improved the developer experience but did not change what developers have to assemble around the runtime. The hard parts are distributing computation, coordinating state, storing data, and autoscaling.

That is where the Durable Objects model comes in:

  • Each object is an individually addressable, single-threaded unit
  • Each has its own SQLite database and WebSocket handling
  • Partitioning work across these objects makes an application scalable by design

Running this model outside Cloudflare was hard, so Dahl built celld.

What changes

Today, workerd supports Durable Objects only as a single instance. That is fine for local testing but not for scaling. Cloudflare's production routing system is too heavy for self-hosters, and an earlier internal attempt to fix this did not work out.

Here is the plan:

  • Ryan Dahl and Bert Belder will lead an effort to make self-hosting workerd a first-class, supported way to run Workers-style apps
  • Code and ideas from celld will be merged into workerd
  • More details are promised in the coming months

The goal is to make the Workers programming model practical to self-host. Cloudflare's hosted platform stays as it is, and self-hosting is an additional option.

Dive Deep

Here are the technical points from the post.

  • celld is a single Rust binary whose only external dependency is object storage, in contrast to the many services Deno Deploy required
  • The post says many celld instances plus one object storage bucket are enough to run many services in one application
  • The model is meant to cover compute, relational databases, queues, and real-time communication for distributed applications
  • Varda argues that Workers was not designed for lock-in; its architecture was chosen because it is better
  • workerd was open-sourced after feedback from large customers, such as Shopify in 2022, who wanted an exit path before committing. Some former customers have since migrated using workerd

The post does not cover timelines, migration tooling, licensing or commercial terms for the merged project, or changes to the Deno runtime itself, which is covered on the Deno blog. You can already start self-hosting celld or workerd today.

Wrap-up

  • The Deno team is joining Cloudflare
  • workerd and celld will be merged to support self-hosting Workers and Durable Objects
  • celld is a single Rust binary that depends only on object storage
  • workerd currently supports Durable Objects as a single instance only
  • More details are coming in the next few months

If you want to run Workers or Durable Objects on your own infrastructure, this is one to watch!