Redis
The Redis driver enables deploying scalable Rivet Actors using Redis as the backend for state management and inter-actor communication.
The Redis driver is currently in preview. We do not recommend shipping production applications with the Redis driver yet.
If you want to take Redis to production, contact us so we can help validate your setup is production ready and help resolve issues promptly.
Feature Support
Feature | Supported |
---|---|
Horizontal scaling | Yes |
WebSockets | Yes |
SSE | Yes |
Edge | No |
Scheduling | Not yet |
Setup
Install packages
Install the required packages:
Configure the driver
Configure your application using environment variables:
Available Environment Variables:
REDIS_HOST
- Redis server hostname (default:localhost
)REDIS_PORT
- Redis server port (default:6379
)REDIS_PASSWORD
- Redis password (optional)REDIS_KEY_PREFIX
- Key prefix for isolation when running multiple projects (optional)
Then start your server:
To prevent data loss, ensure AOF (Append Only File) persistence is enabled on your Redis server. See the Redis Persistence Documentation for setup instructions.
Deploy
Deploy your Redis-powered actors on these hosting providers: