Discord Bot Platform  ·  View 13 of 19  ·  Runtime

Critical Flow — Reconnect and Resume

Resume is cheap; identify is throttled.

Editable source SVG draw.io All views
Bot WebSocket Edge Gateway Node Session Store Registry 1. connect (after jitter) 2. route by shard 3. hello + interval 4. resume(session, seq) 5. load session 6. seq window found 7. entitlement lease 8. grants current 9. replay seq+1 … n 10. invalid session: identify Discord Bot Platform — Critical Flow: Reconnect and Resume Message 10 replaces 5–9 when the window is gone; the bot then pays the identify throttle. v 1.0 · owner Integration Platform Architecture · date 2026-10

Decisions

  • Server-directed jittered reconnect turns a 40,000-bot node loss into a smear, not a spike (ADR-07).
  • Resume re-checks entitlements; a revoked bot cannot resume into events it lost the right to (ADR-08).

Risk

  • If the window is gone the bot must identify, and a whole fleet doing so is the reconnect storm the throttle exists for.