Redis
The Redis Driver is a production-ready implementation that uses Redis for actor state persistence, coordination, and communication. It supports distributed actor systems and enables horizontal scaling across multiple instances.
You rarely need to manually configure drivers. The platform package you’re using will configure the appropriate drivers for you. See the documentation for your platform for details.
ActorCore requires AOF (Append Only File) persistence to be enabled on your Redis server. See the Redis Persistence Documentation for setup instructions.
Compatibility
Platforms | Topologies |
---|---|
Node.js | Standalone |
Bun | Coordinate |
Cloudflare Workers | Partition |
Rivet |
Installation
Install the required packages:
Create a Redis connection and set up your server:
Start your server:
Redis Configuration
The Redis driver requires an ioredis connection instance when creating the drivers. Custom configuration parameters can be passed like:
See the ioredis documentation for more connection configuration options.
Hosted Redis Providers
For production deployments, consider using these managed Redis providers:
- Amazon ElastiCache - AWS managed Redis service
- Azure Cache for Redis - Microsoft Azure managed Redis service
- Google Cloud Memorystore - Google Cloud managed Redis service
- Upstash - Serverless Redis with pay-per-use pricing
- Redis Cloud - Official Redis offering with enterprise features
- Dragonfly - Redis-compatible database with higher performance
Limitations
The Redis driver has several limitations to be aware of:
- Very Limited Storage: Storage is limited to the available memory of your Redis server
- Single Region Support: Only supports deployment within a single region, not globally distributed
- Performance Bottleneck: All operations go through Redis, which can become a bottleneck under high load
- Single Point of Failure: Redis becomes a single point of failure if not configured with proper failover mechanisms
For multi-region support, built-in redundancy, and unlimited storage capacity, consider using Rivet or Cloudflare Workers instead.