Discord Bot Platform  ·  View 07 of 19  ·  Structure

Containers and Components

The shard router is arithmetic; the lease cache makes revocation cheap.

Editable source SVG draw.io All views
Session plane — AKS gateway pool Gateway pod (one per shard group) Connection Manager heartbeat, identify Sequencer per-session seq Resume Buffer bounded ring Serializer JSON, ETF, zstd Fan-out workers Entitlement Filter intents x perms Shard Router id >> 22 mod N Entitlement Lease Cache 10 s TTL Control plane Registry services Application Registry Cosmos DB Installation Service Revocation Broadcaster Event Grid Bot Process Server Partitions Event Hubs WSS events invalidate Discord Bot Platform — Containers and Components Application we own Data store Queue / topic External / third party synchronous event / async Omitted: metrics sidecars and the node drain controller. v 1.0 · owner Integration Platform Architecture · date 2026-10

Decisions

  • Shard = (server_id >> 22) mod N: a computed address, so any node routes any server without a lookup (ADR-02).
  • Entitlement leases of 10 s bound revocation staleness without a registry call per event (ADR-08).

Risk

  • Serializer cost per bot is the dominant CPU line; compression runs only after authentication.