Redis
Redis is optional. When configured, it provides two benefits:
- Fast queue notification — The orchestrator pushes execution IDs to Redis lists (
LPUSH). Workers useBRPOPto wake as soon as work is queued, instead of periodic PostgreSQL polling. - Query caching — Frequently accessed data is cached in Redis with configurable TTL (default: 5 minutes).
Enabling Redis
Set the REDIS_URL environment variable on the orchestrator:
1REDIS_URL=redis://localhost:6379Default Redis connection settings:
| Setting | Default | Description |
|---|---|---|
pool_size | 10 | Number of connections |
min_idle | 2 | Minimum idle connections |
connection_timeout | 10s | Timeout for establishing a connection |
command_timeout | 5s | Timeout for individual commands |
key_prefix | orcher: | Prefix for all Redis keys |
database | 0 | Redis database number |
What Redis Stores
1orcher:queue:{namespace}:{task_queue} → List of execution IDs (LPUSH/BRPOP)Redis is used exclusively as a notification layer. All durable state lives in PostgreSQL. If Redis goes down, workers automatically fall back to PostgreSQL polling — no work is lost.
Redis in Docker Compose
1services:2 redis:3 image: redis:7-alpine4 command: redis-server --appendonly yes5 ports:6 - "6379:6379"7 healthcheck:8 test: ["CMD", "redis-cli", "ping"]9 interval: 10s10 timeout: 3s11 retries: 5Enable AOF (Append-Only File) persistence with --appendonly yes so Redis survives restarts. However, even without persistence, no data is lost — PostgreSQL is authoritative.
Next Steps
- Storage Overview — PostgreSQL configuration and migrations
- Caching & Schema — In-memory cache tiers and database schema details
- Operations & Troubleshooting — Docker Compose setup and troubleshooting