Rivet is an open-source platform designed to solve the limitations of traditional HTTP APIs, databases, and message queues by introducing long-lived, in-memory actor processes. Each actor maintains its own state in memory alongside compute, enabling sub-millisecond read/write operations without database round-trips. This architecture is ideal for real-time, state-intensive applications like collaborative editing, multiplayer games, AI agents, and live chat systems. Rivet is built for developers who need high-performance state management at scale—whether deploying a simple chat room or millions of concurrent user sessions. It separates development simplicity (via RivetKit) from production-scale orchestration (via Rivet Engine), giving teams the flexibility to start small and scale without rewriting their backend.
Rivet’s actor model treats each user session, document, or game instance as an isolated, persistent process. This eliminates the overhead of state serialization and database queries while enabling built-in real-time broadcasting, hibernation for cost efficiency, and automatic failover. With support for TypeScript-first development and deployment options ranging from Cloudflare Workers to Kubernetes, Rivet bridges the gap between serverless convenience and stateful system requirements.
What You Get
- Stateful Compute - Actors maintain in-memory state with persistent storage, eliminating database round-trips for every request. State is accessible directly within actor actions without external queries.
- Realtime Built-In - Automatic WebSocket broadcasting to all clients listening to an actor. Example:
c.broadcast("newMessage", { user, text }); sends updates to all connected clients in real time without additional infrastructure.
- Hibernation - Idle actors are automatically persisted to disk and resumed on demand with zero cold starts. State is restored instantly when a new request arrives.
- Infinitely Scalable - Rivet can manage millions of actors (one per user, document, or session) with automatic horizontal scaling via Rivet Engine, without requiring developers to manage sharding or partitioning.
- Fault Tolerant - Automatic failover and state integrity preservation. If an actor instance crashes, it is restarted on another node with its last persisted state restored.
- Type-Safe End-to-End - TypeScript types are shared between actor definitions and clients. Actions and state are strongly typed from server to frontend, reducing runtime errors.
- Run Anywhere - Deploy RivetKit actors on Node.js, Bun, Next.js, Cloudflare Workers, or connect to self-hosted Rivet Engine. Supports Vercel, Railway, Kubernetes, AWS ECS, Google Cloud Run, and bare metal.
Common Use Cases
- Building a multiplayer chat room - A single actor per chat room keeps message history in memory, broadcasts new messages to all participants via WebSocket, and persists state when idle. No database needed for real-time updates.
- Creating a collaborative document editor - Each document is an actor with live cursor positions and edits. Changes are broadcast instantly to all users, with state persisted between sessions.
- Stateful AI agents with persistent memory - An actor holds conversation history, user preferences, and context between interactions. Each AI agent runs as a long-lived process with full state retention.
- DevOps teams managing real-time microservices - Teams replace polling-based or queue-driven systems with actor-based state machines that respond instantly to events, reducing latency and infrastructure complexity across multi-cloud deployments.
Under The Hood
Rivet GG Rivet is a distributed computing platform designed for stateful, actor-based execution with support for both Rust and TypeScript ecosystems. It enables scalable, serverless workflows while emphasizing observability, error handling, and cross-language interoperability.
Architecture
Rivet follows a modular monorepo structure that supports multi-language development and distributed state management.
- The system is organized into distinct Rust and TypeScript packages with clear separation between core engine components and SDKs.
- Actor-based processing is central to its design, supported by layered services for telemetry, error handling, and configuration.
- Well-defined APIs and protocols such as Epoxy and UPS facilitate communication between distributed components.
- Observability is deeply embedded through OpenTelemetry, logging, and tracing tools that support operational excellence.
Tech Stack
The system leverages a polyglot approach with Rust and TypeScript as its core languages, integrating modern web and infrastructure tools.
- Built primarily in Rust for backend services and TypeScript/JavaScript for frontend experiences, with React-based UIs and Hono for API handling.
- Relies on a suite of libraries including RivetKit, Zod, TanStack Query, Radix UI, and utility packages like clsx and framer-motion.
- Uses Vite, Turbo, PNPM, and Astro for frontend builds and monorepo management, with Hono as a lightweight server framework.
- Vitest is employed for unit testing, ensuring comprehensive coverage across multiple modules and services.
Code Quality
The codebase reflects a structured approach to system design with mixed quality across implementation and documentation.
- Testing is well-integrated with Vitest and CI/CD pipelines, though test coverage remains limited in core modules.
- Error handling follows conventional patterns using result types and exception management, though some inconsistency exists in propagation.
- Code style varies with clear conventions in some areas but disparities in naming and formatting across components.
What Makes It Unique
Rivet introduces innovative patterns in distributed systems through multi-language support and serverless execution models.
- The runtime supports both Rust and TypeScript actors, enabling developers to harness language-specific strengths within a unified abstraction.
- A robust traceability framework provides deep observability into actor execution flows with structured span definitions.
- Its extensible error handling system offers granular failure management and improved debugging in distributed environments.
- The serverless-first architecture includes hibernation capabilities and runner pools, enabling efficient scaling without traditional orchestration.