| ID | iomodel.redis |
|---|---|
| Description | Cache and coordination. |
| Key | redis |
| Type | statefulset |
Redis is the in-memory data store the stack uses for caching and coordination — fast, ephemeral state that speeds things up but does not need the durability guarantees of PostgreSQL.
Role in the stack
Studio caches in Redis and uses it for coordination (e.g. transient locks, rate-limit counters, pub/sub between instances). Losing it degrades performance briefly but does not lose application data.
Redis is listed as a StatefulSet for a stable identity and optional
persistence, but for a pure cache an ephemeral Deployment is also valid.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis
namespace: iomodel
spec:
serviceName: redis
replicas: 1
selector: { matchLabels: { app: redis } }
template:
metadata: { labels: { app: redis } }
spec:
containers:
- name: redis
image: redis:7
args: ['--maxmemory', '256mb', '--maxmemory-policy', 'allkeys-lru']
ports: [{ containerPort: 6379 }]Set a maxmemory limit and an eviction policy (allkeys-lru for a cache) so
Redis can’t grow unbounded and get OOM-killed.
Cache vs. durable store
If you only use Redis as a cache, persistence is optional and a restart is harmless. Enable RDB/AOF persistence only if you rely on it for coordination state that must survive a restart.
1 incoming link
| Source object | Label | Link type | Relation | Raw id | Required | Description | |
|---|---|---|---|---|---|---|---|
| caches in | — | links | iomodel.redis | — | — |
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis
namespace: iomodel
spec:
serviceName: redis
replicas: 1
selector: { matchLabels: { app: redis } }
template:
metadata: { labels: { app: redis } }
spec:
containers:
- name: redis
image: redis:7
args: ['--maxmemory', '256mb', '--maxmemory-policy', 'allkeys-lru']
ports: [{ containerPort: 6379 }]