Rivet Actors can now run on Vercel Functions, bringing stateful, realtime workloads to Vercel's serverless platform.
Cloudflare's Durable Objects introduced a long-lived, stateful primitive in serverless apps – but they come with platform lock-in and resource constraints. Rivet Actors offer an open-source alternative, and by launching on Vercel we unlock better flexibility, control, and developer experience.
Dimension | Rivet Actors on Vercel Functions | Cloudflare Durable Objects | Why it matters |
---|---|---|---|
Runtime | Standard Node.js (Vercel Functions), full support with npm packages | Custom runtime (workerd), subset of Node.js APIs, partial support with npm packages | Using standard Node.js makes packages and frameworks "just work" and reduces vendor lock-in. |
Memory / CPU per actor | Configurable up to 4 GB / 2 vCPU | Per-isolate memory cap 128 MB | Memory-heavy workloads are more feasible on Vercel than on Cloudflare |
Regional control | Configurable specific regions | DOs can be restricted to broad jurisdictions and accept location hints, though limited control | Explicit control helps reduce latency and meet compliance requirements |
Lock-in / portability | Open-source actor library designed to be portable across standard runtimes/clouds | DOs run on Cloudflare's runtime and APIs, not open-source, not portable | Open source + standard runtimes provide flexibility, enables migrations, and allows for on-prem deployments |
Similar to Durable Objects, Rivet Actors provide long-lived, stateful actors with storage, real-time (WebSockets/SSE), and hibernation. However, unlike Durable Objects, Rivet is open-source and portable — you can self-host or run on any platform.
Long-Lived, Stateful Compute: Each unit of compute is like a tiny server that remembers things between requests – no need to re-fetch data from a database or worry about timeouts. Like AWS Lambda, but with persistent memory between invocations and no timeouts.
Realtime, Made Simple: Update state and broadcast changes in realtime with WebSockets or SSE. No external pub/sub systems, no polling – just built-in low-latency events.
No Database Round Trips: State is stored on the same machine as your compute so reads and writes are ultra-fast. No database round trips, no latency spikes.
Sleep When Idle, No Cold Starts: Actors automatically hibernate when idle and wake up instantly on demand with zero cold start delays. Only pay for active compute time.
Architected For Insane Scale: Automatically scale from zero to millions of concurrent actors. Pay only for what you use with instant scaling and no cold starts.
No Vendor Lock-In: Open-source and fully self-hostable.
Running Rivet Actors on Vercel provides many benefits:
Until today, Vercel Functions have not supported WebSockets. Rivet now enables native WebSockets with code running directly in Vercel Functions, powered by our tunneling technology. This brings the flexibility and power of traditional WebSocket servers like Socket.io to Vercel's fully serverless platform for the first time.
This unlocks use cases like:
Read more about realtime events and the raw WebSocket handler.
A stateful AI chatbot with persistent memory and real-time updates:
Today we are launching Rivet Cloud, the fastest way to deploy and scale your Rivet Actors in production.
Rivet Cloud provides a managed platform for deploying and scaling your Rivet Actors without the complexity of self-hosting. Built on the same open-source Rivet Engine, it offers enterprise-grade reliability with the simplicity of a managed service.
Rivet is now a verified app on the Railway Marketplace. With a few clicks, you can deploy and self-host Rivet on Railway and start building stateful apps anywhere you can run Node.js or Bun—without vendor lock-in.
Open-source alternative to Durable Objects
Durable-Objects-style per-key isolation with portability: run it yourself, keep control of runtime, data, and costs.
Actors
Each Actor owns a key (e.g., a user, room, cart) with single-threaded execution, in-memory state, and persistence. That means no ad-hoc locks, no “who owns this?” routing, and no bolt-on caches.
Built-in visibility
Rivet Inspector gives live views of Actor state, messages, and performance for fast debugging.
AI Agents
Real-Time & Collaboration
Stateful APIs
Distributed Workflows
Choose the Rivet Starter template to explore with an example chat app, or the Rivet template to build your own.
For detailed deployment instructions, see the Railway deployment documentation.
Today, we are releasing Rivet v2.0.
This release is a complete rework that makes it simpler to build stateful workloads anywhere you can run NodeJS or Bun.
Rivet v2.0 decouples storage from the platform. The Rivet Engine now supports:
Actors themselves can use File System or Redis drivers, with more storage options coming soon.
Run Rivet in any environment:
v2.0 introduces multi-region architecture for the Rivet Engine:
Rivet v2.0 is open source under the Apache 2.0 license.
Rivet is now distributed as a library rather than a platform service:
Every API call to a cloud provider is a dependency you can't control.
When we built Rivet Actors – an open-source alternative to Cloudflare Durable Objects – we set out to provide a portable foundation for the novel "stateful serverless" architecture that is gaining traction. However, we felt that we weren't doing enough by just being an open-source alternative – we knew we needed to take a step further to make this ubiquitous.
That's why today, we're introducing RivetKit — a port of our core Rivet Actors service exposed as a portable TypeScript library that runs anywhere & can easily be added to your existing backend.
Instead of needing to sign up for a service or run a Docker container to run Rivet Actors, now it runs natively as a lightweight TypeScript library within your codebase & integrates with your existing infrastructure (e.g. Redis).
Our decision to launch RivetKit as a library was underpinned by the following constraints that we kept hearing developers voice:
As a library, RivetKit can run anywhere your infrastructure runs. Currently, RivetKit supports Redis, filesystem, Rivet Cloud, and Cloudflare Workers. Drivers for more platforms such as Postgres, Vercel, and more are trivial to add.
At its core, RivetKit provides Rivet Actors: long-running tasks with persistence & realtime. Rivet Actors provide a simple primitive that provides the same benefits that would usually require many other external services: RPC, realtime, persistence, and long-running tasks.
Rivet Actors excel at:
A simple Rivet actor that combines persistence & realtime looks like this:
And this can be called from your client of choice. For example, JavaScript:
RivetKit is massive rearchitecture of its predecessor, ActorCore. In the process, ActorCore was rebuilt from the ground up to be a library instead of a framework.
Previously, ActorCore required running as a standalone framework. To setup your actors, you'd write:
Then run the ActorCore framework with:
Now, RivetKit is a lightweight library that can be integrated in to your existing backend like this:
And run with vanilla Node.js:
Previously, ActorCore v0.8 required communicating over HTTP with your actors. To talk to actors from your backend, you needed to make a separate HTTP request to the actor manager server.
Now, RivetKit provides an "inline client" that can communicate with actors directly within your backend. For example:
The new onAuth
lifecycle hook provides a way to handle authentication to actors based on intent.
onAuth
runs on the edge server before reaching the actor itself – meaning it doesn't require any compute to run on the actor & is safe from denial of service attacks.
For example:
See the authentication documentation for more details.
See the RivetKit + Better Auth integration.
Actors can now communicate with each other by using the client in the context. For example:
When using the React integration for Rivet Actors, calling useActor
will share the same underlying WebSocket or SSE connection when communicating with actors & will automatically dispose of the connection when no longer in use.
This means you can call useActor
liberally inside your components without complex connection handling logic.
Previously, ActorCore v0.8 used a system of key-value tags to organize actors. This turned to be overkill in practice and added unnecessary complexity under the hood.
This has been replaced with compound keys. Compound keys are either a simple string or an array of strings. The array of strings allows actor keys to inject user-provided strings without having to worry about injection attacks.
For example:
See the new actor handles documentation.
Initializing actors with custom state on what they're responsible for is a common pattern. For example, define an actor like this:
And create it like this:
Read more about creating actors.
Actors now default to using HTTP connections unless explicitly calling .connect()
to upgrade to a WebSocket or SSE connection. This allows for faster passing of messages without compromising on enabling high performance WebSocket- & SSE-based connections.
For example:
Read the new connections documentation.
Parameters & input data to actors are now end-to-end encrypted securely. Previously, they were passed as a query parameter which is frequently leaked in logs. Now, they're passed a secure header.
RivetKit now provides an OpenAPI spec to integrate your own clients. See the full openapi.json.
RivetKit will be a collection of powerful lightweight libraries directly into your codebase for better performance, control, and cost efficiency. No SaaS fees or API dependencies.
Ready to replace your SaaS dependencies with portable libraries? Get started with RivetKit today.
We've updated the installation process for the rivet-cli
package, making it easier than ever to get started with Rivet. This update ensures a seamless setup process whether you're using npx
or installing globally via npm
.
rivet-cli
npm i -g rivet-cli
If you installed the CLI previously, you can update it with:
For one-time usage, you can always use:
Today we're excited to announce updates to Rivet's pricing model, moving to a more transparent and flexible usage-based system. This change allows developers to better scale their applications while only paying for what they use.
Our new pricing structure is designed to be straightforward and predictable:
For more details about our pricing, visit our pricing page.
If you have any questions about the new pricing model, feel free to reach out to us on Discord or support.
Today we are launching Rivet Actor Inspector to help developers view and inspect Rivet Actors. See and edit things like:
Today we are launching Rivet Actors to help developers build and scale realtime applications. They come with a lot of features like:
Learn more: Rivet Actors Documentation