Skip to content

Cluster.Cloudflare reference

Source: packages/effect-cluster/src/Cloudflare/DurableObjectPool.ts

Run an Effect Cluster on Cloudflare: one Worker that hosts every class given this pool on Durable Objects. Each entity instance is a Durable Object named by its type and id, so there are no shards, no runners to place it on, and no database: the object’s own SQLite holds its persisted messages. Each workflow execution is a Durable Object too, and each singleton and cron one that its alarm keeps awake.

Callers anywhere reach the entities through the Worker’s gateway; inside the Worker, one entity calls another’s object directly.

DurableObjectPool: Running entities on Cloudflare

Section titled “DurableObjectPool: Running entities on Cloudflare”
export const Default = ClusterCloudflare.DurableObjectPool("Default");