redis
Catalog date: 2026-06-24.
Multi-purpose key-value store. Holds the kill-switch flag, the BFF session store (Phase 5+), the Celery broker / result backend, the semantic LLM cache, the HierarchicalRAG index, the MetadataPrefetcher cache, and the per-cell pub/sub fan-out for WebSocket progress streams.
Identity
| Field | Value |
|---|---|
| Service id | redis |
| Role | cache |
| Image | redis:7-alpine (compose master) / redis/redis-stack:7.4.0-v3 (local — adds RedisJSON + RedisSearch) |
| Port | 6379 |
| Storage | 2 Gi PVC (cell-local); ElastiCache (AWS) / Memorystore (GCP) / Azure Cache (Azure) in cloud templates |
Deployment surfaces
| Surface | Where |
|---|---|
| Compose | service redis in alphaswarm_platform/compose/docker-compose.yml; redis-stack in deployments/compose/docker-compose.local.yml |
| Kustomize | deployments/kubernetes/base/redis-master/ — single master per cell; base-services/redis-shared/ — shared replica set |
| Terraform module | alphaswarm_platform/terraform/modules/storage/ — managed cache per cloud |
Key namespaces
| Prefix | Owner | Purpose |
|---|---|---|
alphaswarm:kill_switch | WorkloadRuntime, TerraformRuntime | Global halt flag — every state-mutating runtime checks before acting (default value of Settings.risk_kill_switch_key, alphaswarm/risk/kill_switch.py) |
celery:* | Celery broker | Queue names per family (default, backtest, agents, ...) |
alphaswarm:cp:bff:session:* | alphaswarm-cp BFF | Phase 5 session store (sid → IdP token) — alphaswarm_controller/src/alphaswarm_controller/auth/session.py |
alphaswarm:llm:semantic:* | alphaswarm-core | Semantic LLM cache (alphaswarm/llm/cache/semantic.py) |
alphaswarm:cache:* | MetadataPrefetcher | Entity dropdown cache (default value of Settings.cache_key_prefix, alphaswarm/cache/keys.py) |
alphaswarm:rag:* | HierarchicalRAG (now alphaswarm_kb) | Embedding index (default value of Settings.rag_redis_prefix, alphaswarm_kb/src/alphaswarm_kb/rag/redis_store.py) — RAG has moved to the alphaswarm_kb sibling repo |
alphaswarm:task:<task_id> | alphaswarm.ws.broker (invoked from alphaswarm._progress) | WebSocket fan-out frames |
Dependencies
Upstream: none.
Downstream: every runtime pod (alphaswarm-core, alphaswarm-worker,
alphaswarm-beat, alphaswarm-cp, bots).
Operations
- Eviction policy:
allkeys-lrufor caches;noevictionfor Celery to avoid silent task drops. - HA: in-cell single master; cloud templates use managed Redis with multi-AZ replicas.
- Kill-switch: the key is intentionally simple —
setto any truthy value halts; the runtime polls every state-mutating action. - Persistence: AOF every second + RDB snapshot every 5 min.
See also
tasks-api(privatealphaswarm_internalrepo) — Celery broker + Redis pub/sub frame contract. (As of 2026-07-19 this rule content moved out ofalphaswarm/.cursor/rules/into thealphaswarm_internalSSoT repo;alphaswarm/.cursor/rules/pointer.mdcexplains the move.)alphaswarm-management-engine(privatealphaswarm_internalrepo) — redaction rules for any code that handles Redis-stored tokens.storageTerraform module — per-cloud provisioning.