Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_caching-layers

Caching Layers (browser to database, cache-aside on Redis)

8 COMPONENTS · 10 FLOWS · UPDATED 2026-11-20
GITHUB README / PR PREVIEW CARD
[![Caching Layers (browser to database, cache-aside on Redis) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_caching-layers/opengraph-image)](https://archos.sageideas.dev/d/dgm_caching-layers)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_caching-layers)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_caching-layers" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Caching Layers (browser to database, cache-aside on Redis) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  browser_0[("Browser")]
  cdn_1[("Content delivery network (CDN)")]
  app_2["Application server"]
  cache_3[("Distributed cache")]
  db_4[("PostgreSQL")]
  inproc_5[("In-process cache")]
  telemetry_6[("Traces, metrics and logs")]
  capacity_7["Capacity estimate"]
  browser_0 -->|"1. Requests · HTTPS"| cdn_1
  cdn_1 -->|"2. Forwards · HTTP/2"| app_2
  app_2 -->|"3a. Looks up in memory · in-process call"| inproc_5
  app_2 -->|"3b. Checks · RESP"| cache_3
  app_2 -->|"3c. Reads or writes · SQL"| db_4
  db_4 -->|"4. Returns rows · SQL"| app_2
  app_2 -->|"5. Replies · HTTP/2"| cdn_1
  cdn_1 -->|"6. Delivers · HTTPS"| browser_0
  app_2 -->|"Deletes key · RESP"| cache_3
  app_2 -->|"Exports (OTLP) · OTLP"| telemetry_6

COMPONENT STACK (7)

  • BrowserSTATEFUL
    Keeps a private copy of recent responses
  • Content delivery network (CDN)STATEFUL
    Serves shared copies near the user
  • Application serverSTATELESS
    Runs the cache-aside lookup, then the database
  • Distributed cacheSTATEFUL
    Shared copy; a miss falls to the database
  • PostgreSQLSTATEFUL
    Holds the durable data (system of record)
  • In-process cacheSTATEFUL
    Lives in the memory of each Application server
  • Traces, metrics and logsSTATEFUL
    Keeps hit ratio and latency per cache layer

REQUEST & DATA FLOW (10)

  1. Browser → Content delivery network (CDN) (Requests)[HTTPS]
  2. Content delivery network (CDN) → Application server (Forwards)[HTTP/2]
  3. Application server → In-process cache (Looks up in memory)[in-process call]
  4. Application server → Distributed cache (Checks)[RESP]
  5. Application server → PostgreSQL (Reads or writes)[SQL]
  6. PostgreSQL → Application server (Returns rows)[SQL]
  7. Application server → Content delivery network (CDN) (Replies)[HTTP/2]
  8. Content delivery network (CDN) → Browser (Delivers)[HTTPS]
  9. Application server → Distributed cache (Deletes key)[RESP]
  10. Application server → Traces, metrics and logs (Exports (OTLP))[OTLP]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →