Skip to content

Redis — Checklist

OWNER: gerco (infrastructure) ALSO_USED_BY: urszula, maxim (application usage) LAST_VERIFIED: 2026-03-26 GE_STACK_VERSION: Redis 7.4


Overview

Machine-parseable checklists for Redis usage in GE. Items grow organically — agents add items when they discover pitfalls. Items are NEVER removed — only marked DEPRECATED: {reason} if no longer applicable.


PRE-DEVELOPMENT CHECKLIST (Redis integration)

  • [ ] CHECK: Connection uses port 6381 (not 6379) IF_SKIPPED: Connection refused or wrong Redis instance ADDED_FROM: ge-infrastructure-2026-01, port confusion
  • [ ] CHECK: Connection includes authentication (password from ge-secrets) IF_SKIPPED: Connection rejected, pod CrashLoopBackOff ADDED_FROM: ge-orchestrator-deploy-2026-03-19, auth failure
  • [ ] CHECK: Connection uses a connection pool (10-20 connections per service) IF_SKIPPED: Connection exhaustion or serialized commands
  • [ ] CHECK: Redis is used as cache or message broker only — PostgreSQL is SSOT IF_SKIPPED: Data loss on Redis restart or eviction

STREAM USAGE CHECKLIST (every XADD)

  • [ ] CHECK: XADD includes MAXLEN ~ constraint IF_SKIPPED: Unbounded stream growth, memory exhaustion ADDED_FROM: ge-infrastructure-2026-02, unbounded stream incident
  • [ ] CHECK: MAXLEN is ~100 for per-agent streams, ~1000 for system streams IF_SKIPPED: Either data loss (too low) or memory waste (too high)
  • [ ] CHECK: Task is published to ONE stream only (not both triggers.{agent} AND ge:work:incoming) IF_SKIPPED: Double execution, double cost ADDED_FROM: ge-token-burn-2026-02-13, task-service.ts
  • [ ] CHECK: Consumer uses XREADGROUP (not plain XREAD) IF_SKIPPED: No acknowledgment tracking, no load balancing, no recovery
  • [ ] CHECK: Consumer calls XACK after successful processing IF_SKIPPED: PEL grows, memory leak, messages redeliver indefinitely
  • [ ] CHECK: Consumer is idempotent (handles duplicate delivery) IF_SKIPPED: Duplicate work execution
  • [ ] CHECK: Dead letter handling exists for messages delivered 3+ times IF_SKIPPED: Poison pill messages block the consumer forever

CACHING CHECKLIST (every cache operation)

  • [ ] CHECK: Every cached key has a TTL set (EX or EXPIRE) IF_SKIPPED: Key persists forever, memory leak
  • [ ] CHECK: TTL has jitter for batch-created keys (+/- 10% of base TTL) IF_SKIPPED: Synchronized expiration causes cache stampede
  • [ ] CHECK: Cache invalidation strategy is defined (delete-on-write, event-based, or TTL-only) IF_SKIPPED: Stale data served indefinitely
  • [ ] CHECK: Negative caching implemented for "not found" lookups IF_SKIPPED: Repeated DB queries for missing data
  • [ ] CHECK: Cache values are under 100KB per key IF_SKIPPED: Slow reads, memory fragmentation, blocking deletes

CODE REVIEW CHECKLIST (every Redis-touching PR)

  • [ ] CHECK: No KEYS command anywhere in the codebase IF_SKIPPED: Production freeze when keyspace is large ADDED_FROM: ge-infrastructure-2026-01, KEYS freeze incident
  • [ ] CHECK: No SMEMBERS, HGETALL, or LRANGE 0 -1 on potentially large collections IF_SKIPPED: Blocking read, event loop freeze
  • [ ] CHECK: UNLINK used instead of DEL for keys that may be large IF_SKIPPED: Blocking delete on main thread
  • [ ] CHECK: Pipelines used for batch operations (3+ independent commands) IF_SKIPPED: N round-trips instead of 1
  • [ ] CHECK: Lock releases use Lua atomic check-and-delete (not plain DEL) IF_SKIPPED: May release another process's lock
  • [ ] CHECK: No Redis 8.x-only commands used (XACKDEL, idempotent XADD) IF_SKIPPED: Command fails in production (Redis 7.4)
  • [ ] CHECK: No post-completion hooks with condition "always" at no_block tier IF_SKIPPED: Infinite agent loop, token burn ADDED_FROM: ge-token-burn-2026-02-13, annegreet-eltjo loop

DEPLOYMENT CHECKLIST (Redis configuration)

  • [ ] CHECK: maxmemory is set (GE standard: 256MB) IF_SKIPPED: Redis grows until OOM kill
  • [ ] CHECK: maxmemory-policy is allkeys-lru IF_SKIPPED: Writes rejected when memory is full (noeviction policy)
  • [ ] CHECK: appendonly is yes with appendfsync everysec IF_SKIPPED: Stream data lost on restart (no persistence)
  • [ ] CHECK: k8s probes include Redis authentication IF_SKIPPED: Probe failure, CrashLoopBackOff ADDED_FROM: ge-orchestrator-deploy-2026-03-19, probe failure
  • [ ] CHECK: client-output-buffer-limit pubsub is set (GE: 32mb 8mb 60) IF_SKIPPED: Slow Pub/Sub subscriber exhausts memory

Cross-References

READ_ALSO: wiki/docs/stack/redis/index.md READ_ALSO: wiki/docs/stack/redis/streams.md READ_ALSO: wiki/docs/stack/redis/pitfalls.md READ_ALSO: wiki/docs/stack/redis/caching.md READ_ALSO: wiki/docs/stack/redis/patterns.md