Skip to main content

Durable Objects, without the lock-in.

Rivet runs the same Actor model in your own Node.js or Bun process, on any cloud, with realtime, cron and lifecycle hooks built in.

Choose Rivet for

  • Yes: Any cloud, your VPC or on-prem
  • Yes: Next to your database
  • Yes: Node.js, Bun and native npm packages
  • Yes: Actors that need over 128 MB
  • Yes: Fast SQLite with no size cap
  • Yes: Open source, control plane included

Choose Durable Objects for

  • Yes: Apps already on Cloudflare Workers
  • Yes: Cloudflare’s edge network
  • Yes: Low-level primitives

Same model on both, so each Durable Object class maps to one Rivet Actor.

Port a Durable Object to Rivet

Paste the prompt into your coding agent, or follow the quickstart.

Read the quickstart

Migrating off Cloudflare? Run your Workers and Durable Objects anywhere with OpenOrange.

Try OpenOrange

Why Durable Objects struggle outside Cloudflare

Only the runtime is open source, so in production Durable Objects run on Cloudflare.

  • No: Storage and control plane are proprietaryOnly workerd is open source; its object storage is experimentalYes: Open source, control plane includedApache 2.0: run the whole stack in production
  • No: Runs only on CloudflareMoving clouds means porting every objectYes: Runs on any cloud or on-premRivet Cloud, your VPC or your own servers
  • No: Every query to your database crosses the internetUnpredictable p99 to AWS, GCP or Azure, and replies pay cloud egressYes: Actors run next to your databaseSame network: steady latency, no internet egress
  • No: Jurisdictions, but no network isolationData stays in a region, not in your VPCYes: Runs inside your VPCWith bring your own cloud or self-hosting
  • No: Workers runtime onlynodejs_compat covers many npm packages, not native onesYes: Runs in your Node.js, Bun or Deno processNative packages work on Node.js
  • No: 128 MB of memory per isolateLarge in-memory state has to be split upYes: No fixed memory capSized by the machines you run

Why Durable Objects are slow and capped at 10 GB

p50 round trips in our open benchmark, same region. Durable Objects are timed inside Cloudflare, which favors them.

  • No: 10 GB of SQLite per objectThen writes fail with SQLITE_FULLYes: No fixed storage limitOlder data moves to S3, so Actors keep growing
  • No: Slow durable writes30 ms to write one rowYes: 1.24 ms per durable writeAcknowledged by 2 of 3 zones
  • No: Few writes per second on one object25.8 sequential durable writes per secondYes: 790 writes per second on one ActorSequential, each one durable
  • No: Slow to create222 ms to create an object and answer itYes: 4.30 ms to create an ActorIncluding its first request
  • No: Slow requests, even when warm11 ms for a request to a running objectYes: 0.45 ms per requestTo a running Actor

Why Durable Objects are low-level for long-running apps

Timers, shutdown, setup and reconnects are yours to build, and durable workflows are a separate product.

  • No: One alarm per objectMany timers or a cron need your own schedule tableYes: Timers and cron built inSchedules survive sleep, restarts and upgrades
  • No: No shutdown hooksIn-flight work gets up to 30 seconds on a runtime updateYes: onSleep and onDestroy hooksA configurable grace period to finish work
  • No: No input when an object is createdSet it up with an extra callYes: Pass input on createState is ready on the first request
  • No: Durable workflows are a separate productNo realtime channel, 1 MiB step results, 10,000 steps by defaultYes: A workflow runs inside each ActorSteps write its SQLite and broadcast to clients; loops prune old history
  • No: Broadcasting to clients is hand-rolledWrite your own fanout, or adopt PartyServerYes: Events built inBroadcast to one connection or all of them
  • No: Connection handling is low-levelReconnects and failures are your codeYes: Clients reconnect automaticallyOver WebSockets or HTTP

Rivet vs Durable Objects

FeatureDurable ObjectsRivet
Self-hostingNo: Cloudflare onlyYes: Your cloud, on-prem or air-gapped
Bring your own cloudNo: Not offeredYes: Run Rivet in your VPCFully managed by Rivet
ForkingNo: No built-in way to copy an objectA new object starts emptyYes: Fork an Actor in 20 msBranch an agent with its SQLite, schedules and progress
BillingPartly: Wall-clock time at 128 MB per objectUsed or not, even waiting on I/O, plus every RPC callYes: Rivet Cloud bills raw hardware and storageMany Actors share each node you pay for
Admin APIPartly: List Objects returns IDs onlyPlus whether each has stored dataYes: Find Actors by name and keyThen fork, reschedule or destroy them from your tools
UpgradesPartly: Percentage rolloutsObjects take new code when idle or on a timerYes: Your own rollout processShip nodes the way you already deploy
MonitoringPartly: Cloudflare dashboardLogs through Workers Logs and LogpushYes: Your existing stackPrometheus metrics, your own logging
TestingPartly: Vitest inside workerdKnown gaps, like WebSockets with isolated storageYes: Vitest in Node.jsMocks and fake timers work
Actor modelSame on bothOne instance per key, one writer at a time
ORMsSame on bothDrizzle, or plain SQL
WebSocketsSame on bothWebSockets and HTTP straight to each Actor
SleepSame on bothSleeps when idle, wakes on the next request
Managed cloudSame on bothRivet Cloud, or Cloudflare

Keep the Actor model. Run it anywhere.

State, SQLite, realtime and scheduling in each Actor, on Rivet Cloud or your own infrastructure.

Read the quickstartTalk to an engineer

Migrating off Cloudflare? Run your Workers and Durable Objects anywhere with OpenOrange.

Try OpenOrange