Saltar al contenido principal

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​

FieldValue
Service idredis
Rolecache
Imageredis:7-alpine (compose master) / redis/redis-stack:7.4.0-v3 (local — adds RedisJSON + RedisSearch)
Port6379
Storage2 Gi PVC (cell-local); ElastiCache (AWS) / Memorystore (GCP) / Azure Cache (Azure) in cloud templates

Deployment surfaces​

SurfaceWhere
Composeservice redis in alphaswarm_platform/compose/docker-compose.yml; redis-stack in deployments/compose/docker-compose.local.yml
Kustomizedeployments/kubernetes/base/redis-master/ — single master per cell; base-services/redis-shared/ — shared replica set
Terraform modulealphaswarm_platform/terraform/modules/storage/ — managed cache per cloud

Key namespaces​

PrefixOwnerPurpose
alphaswarm:kill_switchWorkloadRuntime, TerraformRuntimeGlobal halt flag — every state-mutating runtime checks before acting (default value of Settings.risk_kill_switch_key, alphaswarm/risk/kill_switch.py)
celery:*Celery brokerQueue names per family (default, backtest, agents, ...)
alphaswarm:cp:bff:session:*alphaswarm-cp BFFPhase 5 session store (sid → IdP token) — alphaswarm_controller/src/alphaswarm_controller/auth/session.py
alphaswarm:llm:semantic:*alphaswarm-coreSemantic LLM cache (alphaswarm/llm/cache/semantic.py)
alphaswarm:cache:*MetadataPrefetcherEntity 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-lru for caches; noeviction for 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 — set to any truthy value halts; the runtime polls every state-mutating action.
  • Persistence: AOF every second + RDB snapshot every 5 min.

See also​

  • tasks-api (private alphaswarm_internal repo) — Celery broker + Redis pub/sub frame contract. (As of 2026-07-19 this rule content moved out of alphaswarm/.cursor/rules/ into the alphaswarm_internal SSoT repo; alphaswarm/.cursor/rules/pointer.mdc explains the move.)
  • alphaswarm-management-engine (private alphaswarm_internal repo) — redaction rules for any code that handles Redis-stored tokens.
  • storage Terraform module — per-cloud provisioning.