Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_fail-thundering-herd-and-stampede

Thundering herd and cache stampede

7 COMPONENTS · 6 FLOWS · UPDATED 2026-11-23
GITHUB README / PR PREVIEW CARD
[![Thundering herd and cache stampede — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_fail-thundering-herd-and-stampede/opengraph-image)](https://archos.sageideas.dev/d/dgm_fail-thundering-herd-and-stampede)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_fail-thundering-herd-and-stampede)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_fail-thundering-herd-and-stampede" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Thundering herd and cache stampede — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("Client application")]
  app_1["Container runtime"]
  l1_2[("In-process cache")]
  redis_3[("Distributed cache")]
  db_4[("PostgreSQL")]
  obs_5["OpenTelemetry Collector"]
  sink_6[("Client application")]
  client_0 -->|"1. Hot burst · HTTPS"| app_1
  app_1 -->|"2. Checks L1 · TCP"| l1_2
  l1_2 -->|"3. Takes lease · RESP"| redis_3
  redis_3 -->|"4. 1 origin SQL · SQL"| db_4
  db_4 -->|"5. Refills · HTTPS"| sink_6
  app_1 -->|"Hit ratio · OTLP"| obs_5

COMPONENT STACK (7)

  • Client applicationSTATEFUL
    10k concurrent misses
  • Container runtimeSTATELESS
    Singleflight leader
  • In-process cacheSTATEFUL
    Local hot-key L1
  • Distributed cacheSTATEFUL
    Jittered TTL + lease
  • PostgreSQLSTATEFUL
    1 query, not 10,000
  • OpenTelemetry CollectorSTATELESS
    Tracks cache hit ratio
  • Client applicationSTATEFUL
    Sub-10ms shared reply

REQUEST & DATA FLOW (6)

  1. Client application → Container runtime (Hot burst)[HTTPS]
  2. Container runtime → In-process cache (Checks L1)[TCP]
  3. In-process cache → Distributed cache (Takes lease)[RESP]
  4. Distributed cache → PostgreSQL (1 origin SQL)[SQL]
  5. PostgreSQL → Client application (Refills)[HTTPS]
  6. Container runtime → OpenTelemetry Collector (Hit ratio)[OTLP]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →