ARCHOS 525 BLUEPRINT · /d/dgm_distributed-cache
Distributed Cache (sharded Redis behind consistent hashing)
13 COMPONENTS · 16 FLOWS · UPDATED 2026-11-20
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_distributed-cache) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_distributed-cache)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_distributed-cache" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Distributed Cache (sharded Redis behind consistent hashing) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
browser_0[("Browser")]
app_1["Application server"]
pdp_2["Policy decision point"]
router_3["Shard router"]
secrets_4[("Secrets manager")]
sa_5[("Distributed cache")]
sb_6[("Distributed cache")]
sc_7[("Distributed cache")]
gutter_8[("Distributed cache")]
db_9[("PostgreSQL")]
telemetry_10[("Traces, metrics and logs")]
alerting_11[("Alerting")]
capacity_12["Capacity estimate"]
browser_0 -->|"1. Calls with a JWT · HTTPS"| app_1
app_1 -->|"2. Asks if allowed · gRPC"| pdp_2
pdp_2 -->|"3. Returns decision · gRPC"| app_1
app_1 -->|"4. Asks · RESP"| router_3
router_3 -->|"5a. By key (mTLS) · RESP"| sa_5
router_3 -->|"5b. By key (mTLS) · RESP"| sb_6
router_3 -->|"5c. By key (mTLS) · RESP"| sc_7
router_3 -->|"5d. Falls back (mTLS) · RESP"| gutter_8
sb_6 -->|"6. Hit or lease (mTLS) · RESP"| router_3
router_3 -->|"7. Returns · RESP"| app_1
app_1 -->|"8. Reads on miss · SQL"| db_9
db_9 -->|"9. Returns rows · SQL"| app_1
app_1 -->|"10. Delivers (HTTPS) · HTTPS"| browser_0
secrets_4 -->|"Supplies credentials · HTTPS"| router_3
router_3 -->|"Exports (OTLP) · OTLP"| telemetry_10
telemetry_10 -->|"Feeds · HTTP"| alerting_11COMPONENT STACK (12)
- BrowserSTATEFULAsks for a page from the user's device
- Application serverSTATELESSChecks the token, adds a trace id, asks the cache
- Policy decision pointSTATELESSSays whether this caller may read the key
- Shard routerSTATELESSHolds the Hash ring; picks a shard from the key
- Secrets managerSTATEFULHolds cache passwords and TLS certificates
- Distributed cacheSTATEFULShard a: its replica sits in another zone
- Distributed cacheSTATEFULShard b: its replica sits in another zone
- Distributed cacheSTATEFULShard c: its replica sits in another zone
- Distributed cacheSTATEFULSpare pool that takes a dead shard’s keys
- PostgreSQLSTATEFULHolds the durable data (system of record)
- Traces, metrics and logsSTATEFULKeeps hit ratio and load per shard
- AlertingSTATEFULPages on-call on shard latency, errors or saturation
REQUEST & DATA FLOW (16)
- Browser → Application server (Calls with a JWT)[HTTPS]
- Application server → Policy decision point (Asks if allowed)[gRPC]
- Policy decision point → Application server (Returns decision)[gRPC]
- Application server → Shard router (Asks)[RESP]
- Shard router → Distributed cache (By key (mTLS))[RESP]
- Shard router → Distributed cache (By key (mTLS))[RESP]
- Shard router → Distributed cache (By key (mTLS))[RESP]
- Shard router → Distributed cache (Falls back (mTLS))[RESP]
- Distributed cache → Shard router (Hit or lease (mTLS))[RESP]
- Shard router → Application server (Returns)[RESP]
- Application server → PostgreSQL (Reads on miss)[SQL]
- PostgreSQL → Application server (Returns rows)[SQL]
- Application server → Browser (Delivers (HTTPS))[HTTPS]
- Secrets manager → Shard router (Supplies credentials)[HTTPS]