Tsumugi

Job system for Cloudflare Workers on Durable Objects and Queues

Image 1 of 4: Run waterfall of a flow: list, a fan-out of three greet jobs and report, with queue and execution time per node

A Durable Object per binding schedules, retries and throttles jobs on its own SQLite state, Cloudflare Queues execute them, and an outbox projects every state change to D1 for a dashboard and REST API. Priorities, unique keys, cron schedules, DAG flows and per-job at-most-once delivery.

Trade-offs

  • One Durable Object per binding coordinates its jobs, so concurrency is counted exactly on a single thread, but a binding's throughput tops out at what one Durable Object can process.
  • The Durable Object only decides and hands execution to Queues, since it is billed on wall-clock time: a 10-minute job no longer keeps a coordinator request alive.
  • State reaches the dashboard through an outbox batched to D1 every few seconds, so search, paging and aggregates are plain SQL, but running jobs show a few seconds late.

Q&A2

Per job, yes. At-least-once is the default; an at-most-once job takes a claim token from the Durable Object before running, a second delivery with that token is refused, and if its completion report is lost it moves to STALLED for a person to decide instead of being re-enqueued.

Reviews

Loading reviews

    More in Job queues

    See all 7 →
    • jobdGPU-aware job broker for a few personal machines, with an MCP server
    • arbiterPostgreSQL job queue for Haskell, with no broker and no leader
    • Job Scheduler PlatformDurable one-off and cron jobs posted to webhooks, with retries and a DLQ
    • QueueScopeNative macOS dashboard for BullMQ queues on Redis
    • RoundhouseOps UI for Sidekiq and Solid Queue, mounted as a Rails engine
    • ForqMessage queue on SQLite in a single binary

    More in Cloudflare Workers

    See all 27 →
    • open-computeSelf-hosted Cloudflare Workers-compatible platform in one Rust binary
    • ZeroLinkAccount-free secret sharing where the receiver locks the link first
    • YAOSReal-time Obsidian sync engine on a self-deployed Cloudflare Worker
    • Quire InkA self-hosted blog for one writer, with a reader pen and an MCP server built in
    • hostcOne command gives a dev server a public HTTPS URL
    • CF ActivityPubA Mastodon-compatible ActivityPub server running entirely on Cloudflare

    More in Serverless

    See all 10 →
    • MockNest ServerlessWireMock-compatible API mocking in an AWS account
    • VeloSelf-hosted control plane for Postgres backups, PITR and dev branches
    • minshopSmall store on Cloudflare Workers that agents can pay
    • AuthrimOpenID Certified identity hub on Cloudflare's edge
    • OmniMailSelf-hosted multi-domain webmail on Cloudflare
    • nodrixSelf-hosted IoT backend inside a Cloudflare account