Redis Distributed State
Why Redis?
Section titled “Why Redis?”AgentWatch keeps its gateway state in memory on each node. When Redis is configured, conversation-session state is shared across nodes, so a multi-node deployment behind a load balancer resolves the same conversation the same way whichever node receives the request.
What Redis Enables
Section titled “What Redis Enables”| Capability | Without Redis | With Redis |
|---|---|---|
| Conversation-session state | Per node | Shared across nodes |
| Rate limiting | Per node | Per node (not yet shared) |
| Circuit breaker | Per node | Per node (not yet shared) |
| Response caching | Per node | Per node (not yet shared) |
Rate limits, circuit breakers and caches are currently per node. In a multi-node deployment, size per-node rate limits with that in mind.
Graceful Fallback
Section titled “Graceful Fallback”If Redis becomes unavailable (connection refused, timeout, etc.), AgentWatch automatically falls back to in-memory state until Redis is restored.
Configuration
Section titled “Configuration”Configure Redis in Settings → General Settings → Redis / Distributed State (super admin): connection URL, key prefix and TLS, with a Test connection button. The same settings can be written with PUT /api/admin/settings/redis; saving re-initializes the connection.
| Field | Description |
|---|---|
redisEnabled |
Set to true to activate Redis state sharing |
redisUrl |
Redis connection URL (redis:// or rediss:// for TLS); include the password in the URL if Redis AUTH is set |
redisKeyPrefix |
Prefix for all AgentWatch keys (default aw:) — allows sharing a Redis instance with other services |
redisTlsEnabled |
Enable TLS for an encrypted connection |
When to Use Redis
Section titled “When to Use Redis”| Deployment | Redis Needed? |
|---|---|
| Single-node (development, small teams) | No |
| Multiple nodes behind load balancer | Recommended — shares conversation-session state |
| High-availability active-active | Yes |
| Kubernetes with multiple replicas | Yes |