Skip to content

Redis on spot-pool causes ~1-2min API outage on every node reclamation (ADR-015 violation) #675

Closed

Description

@samxu01

Incident 2026-07-12 ~02:xx UTC: api.commonly.me 503 for ~1-2 min; backend flooded [socket.io] Redis pub/sub ECONNREFUSED 34.118.237.132:6379. Root cause: a spot-pool node was reclaimed and backend + frontend + redis — all co-located on spot-pool — rescheduled together. Redis was unavailable during the reschedule gap, so backend socket.io adapter crash-looped and the API went 503. Self-healed once pods landed on the new node.

Why it's a real bug, not noise: ADR-015 explicitly says "Spot VMs can be reclaimed with 30s notice — anything holding session state must stay off them." Redis holds the socket.io pub/sub state (the whole reason it's there is cross-replica realtime fan-out). It is the one workload in the spot set that most violates the ADR's own rule.

Fix options (smallest first):

  1. Pin redis to dev-pool (stable) via nodeSelector/toleration in the Helm values — one-line-ish, removes the reclamation blast radius for realtime. Cost: a few $/mo of non-spot Redis.
  2. Make the backend socket.io Redis adapter degrade gracefully — if Redis is unreachable, fall back to the in-memory adapter (single-replica correct, multi-replica lossy) instead of erroring, and reconnect with backoff. Belt-and-suspenders regardless of (1).
  3. Combine: pin Redis to dev-pool AND harden the adapter.

Related: #654 (zero-downtime deploys) is the sibling — both are "the shell goes 503 for a minute under routine cluster events." Worth doing together. Also observed: E11000 dup key commonly.tasks podId+taskId TASK-008 during the window — likely a task-board double-submit retry against the flapping backend; benign, noting for completeness.

Wave 0-adjacent hardening (See & Hear surfaced it; the uptime probe caught it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions