redis
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-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 |
celery:* | Celery broker | Queue names per family (default, backtest, agents, ...) |
bff:session:* | alphaswarm-cp BFF | Phase 5 session store (sid → IdP token) |
m2m:tokens:* | alphaswarm-cp auth broker | M2M token cache |
cache:llm:* | alphaswarm-core | Semantic LLM cache |
cache:metadata:* | MetadataPrefetcher | Entity dropdown cache |
rag:* | HierarchicalRAG | Embedding index |
pubsub:progress:<task_id> | 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— Celery broker + Redis pub/sub frame contract.alphaswarm-management-engine— redaction rules for any code that handles Redis-stored tokens.storageTerraform module — per-cloud provisioning.