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
[](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_6COMPONENT STACK (7)
- BrowserSTATEFULKeeps a private copy of recent responses
- Content delivery network (CDN)STATEFULServes shared copies near the user
- Application serverSTATELESSRuns the cache-aside lookup, then the database
- Distributed cacheSTATEFULShared copy; a miss falls to the database
- PostgreSQLSTATEFULHolds the durable data (system of record)
- In-process cacheSTATEFULLives in the memory of each Application server
- Traces, metrics and logsSTATEFULKeeps hit ratio and latency per cache layer
REQUEST & DATA FLOW (10)
- Browser → Content delivery network (CDN) (Requests)[HTTPS]
- Content delivery network (CDN) → Application server (Forwards)[HTTP/2]
- Application server → In-process cache (Looks up in memory)[in-process call]
- Application server → Distributed cache (Checks)[RESP]
- Application server → PostgreSQL (Reads or writes)[SQL]
- PostgreSQL → Application server (Returns rows)[SQL]
- Application server → Content delivery network (CDN) (Replies)[HTTP/2]
- Content delivery network (CDN) → Browser (Delivers)[HTTPS]
- Application server → Distributed cache (Deletes key)[RESP]
- Application server → Traces, metrics and logs (Exports (OTLP))[OTLP]