SpecsModelExplore
Overview
IOModel Stack
Reverse ProxyIOModel StudioYjs Realtime ServerKeycloakPostgreSQLRedis
SpecsModelExplore
Redis
OverviewRedis GuideLinks and Communications
IDiomodel.redis
DescriptionCache and coordination.
Keyredis
Typestatefulset
Table of contents
Redis Guide
Why it's needed
Deployment

Redis Guide

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.

Why it’s needed

  • Caching — keeps hot data out of PostgreSQL to cut latency and load.
  • Coordination — shared counters, locks, and pub/sub across Studio replicas.
Disposable state — contents can be rebuilt; treat it as a performance layer, not a source of truth.

Deployment

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.

Links and Communications

1 incoming link

Incoming Links(1)

Source objectLabelLink typeRelationRaw idRequiredDescription
IOModel Studio

deployment.iomodel.studio

deployment
caches in—linksiomodel.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 }]