Sign In
Drivers

Memory

The Memory driver stores all actor state and communication in memory, making it ideal for testing, development, and prototyping scenarios where persistence is not required.

The Memory driver does not persist data between server restarts. For production applications that need to scale horizontally across multiple machines, use the Redis driver.

Feature Support

FeatureSupported
Horizontal scalingNo
WebSocketsYes
SSEYes
EdgeNo
SchedulingYes

Setup

Install packages

The Memory driver is included with @rivetkit/actor - no additional packages needed:

Command Line
npm install @rivetkit/actor

Configure the driver

Create and use the Memory driver:

server.ts
import { createMemoryDriver } from "@rivetkit/actor";
import { registry } from "./registry";

const driver = createMemoryDriver();
const { serve, client } = registry.runServer({ driver });

// ...rest of your server...

The Memory driver requires no configuration options.

Suggest changes to this page