celld — Durable Objects, self-hosted
摘要
celld 是一个可自托管的分布式 Durable Objects 实现,目标是在不改动 Workers 和 Durable Objects 代码的情况下运行应用,并将数据存放在用户自己的对象存储桶中。文章给出了安装脚本、Docker 运行方式和代理创建应用的示例,并列出持久性、延迟、吞吐、故障切换、内存占用与成本等测试数据。其实现以对象存储桶协调单元归属,通过原子写入获取租约,并用 LTX 持续复制每个单元的 SQLite 状态;文章还说明了自托管后故障域和运行证据更透明,但可靠性取决于自有节点、网络、存储桶服务商及运维选择。
荐读理由
做状态型 AI 服务时,可用 58 MB 可执行文件或 Docker 部署 celld,把 Workers/DO 代码和 SQLite 状态放进自有节点与存储,减少托管绑定
原文
celld
self-hosted, distributed Durable Objects
Your Workers and Durable Objects code runs unchanged (supported APIs →)
Your data lives in a bucket you own
Orders of magnitude cheaper at scale
Install the 58 MB static executable
$ curl -fsSL [celld.dev/install.sh](https://celld.dev/install.sh) | sh
Or run the docker container
$ docker run [ghcr.io/denoland/celld](https://github.com/denoland/celld/pkgs/container/celld)
Or just tell your agent
❯ create a distributed chat app with vite, use celld.dev and [exe.dev](https://exe.dev/), 2 VMs
Key characteristics
Durability
Writers per cell (epoch-fenced)1
Acknowledged writes lost on kill0RPO=0
Durable write latency (region-local)~90ms
Failover after node loss, 0 lost~20s
Speed (warm)
Stateless request p50 / p990.2 / 0.3ms
Stateless throughput / worker thread~94kreq/s
Wake a hibernated cell~4ms
Density & cost
RAM per resident cell4MB
Resident cells / 8 GB node1,000cells
Inactive cell cost~0bucket ops
$ / resident cell-month~$0.05
Compatibility
Supported Workers/DO APIsdocs →
Speed and density: one node, trivial cells, an Apple M-series laptop over loopback. Fleet vCPUs are slower — activation p50 is 35.9 ms on a 2 vCPU node.
Durability: a 4 vCPU / 8 GB fleet in one region, against a region-local bucket. Failover is SIGKILL of a loaded node with every room verified after recovery. How this is measured →
Monthly cost vs resident fleet size
Durable Objects: Workers Paid, $5/mo plus $4.15 per resident cell-month; its free plan covers toy scale.
celld: whole $48 / 8 GB nodes (DigitalOcean us-east list), capped at 1,000 resident cells each; capacity is added in steps.
Base cost before workload: application traffic and writes add compute and bucket usage. Click a dot for the modeled bill.
How it works
The bucket is the coordinator — no membership protocol, no failure detector, no consensus. Ownership is a record in your bucket, claimed with one atomic write. celld's built-in replicator continuously ships each cell's SQLite state to that bucket as LTX segments.
Reliability
Durable Objects is a strong programming model. celld keeps that model while moving placement, state, and operational evidence into infrastructure you choose.
orangecloud.report · 12 July 2026 ↗
cloudflarestatus.com · 16 July 2026 ↗
What changes when you run the model yourself.
PLACEMENT
No shared machine to lose
A cell's identity isn't fused to a machine — ownership is a lease in your bucket, granted by compare-and-swap. Lose a node and another acquires the lease and restores the cell in seconds: your fleet reading your storage, not a vendor restoring a placement you can't see.
BLAST RADIUS
A failure domain you choose
Your fleet still depends on its machines, network, and bucket provider. What changes is tenancy: no shared Durable Objects scheduler or placement layer can couple your application to another customer's workload.
LEGIBILITY
A failure you can read
When a cell misbehaves the evidence is on your disk — the ownership record, the SQLite and LTX files, and the logs. You answer “what happened to my cell” with sqlite3 and grep, not a status page that declines to say.
Self-hosting is not automatically more reliable. It makes the failure domain explicit and inspectable: your nodes, your bucket provider, and your operational choices.
And to be clear about the tone: we love Cloudflare — this very page is served by a Cloudflare Worker. The Durable Objects model — a single-threaded object with its own storage, addressed by name — is one of the best primitives distributed systems has been handed in years, and that design is Kenton Varda's and the Cloudflare Workers team's. celld is a love letter to their idea; a primitive this good deserves to run anywhere.
a stateful distributed system that rests entirely on S3
LTX is Litestream's replica format, from Ben Johnson
这条对你有帮助吗?