ARCHOS 525 BLUEPRINT · /d/dgm_api-gateway-design
API Gateway (single entry point with auth, limits and a circuit breaker)
11 COMPONENTS · 15 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_api-gateway-design) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_api-gateway-design)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_api-gateway-design" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="API Gateway (single entry point with auth, limits and a circuit breaker) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0[("API Client")]
idp_1[("Identity provider (IdP)")]
backend_2["Resource server"]
pdp_3["Policy decision point (PDP)"]
gw_4["API gateway"]
rl_5[("Rate limiter")]
fed_6["GraphQL federation"]
secrets_7[("Secrets manager")]
tsdb_8[("Time-series database (TSDB)")]
alerting_9[("Alerting")]
capacity_10["Capacity Estimate"]
client_0 -->|"1. Calls with a JWT · HTTPS"| gw_4
gw_4 -->|"2. Asks if allowed (mTLS) · gRPC"| pdp_3
pdp_3 -->|"3. Returns decision · gRPC"| gw_4
gw_4 -->|"4. Asks for limit (mTLS) · gRPC"| rl_5
rl_5 -->|"5. Returns decision · gRPC"| gw_4
gw_4 -->|"6. Forwards (mTLS) · HTTP/2"| fed_6
fed_6 -->|"7. Queries (mTLS) · HTTP/2"| backend_2
backend_2 -->|"8. Returns data · HTTP/2"| fed_6
fed_6 -->|"9. Returns reply · HTTP/2"| gw_4
gw_4 -->|"10. Reply or 403/429/503 · HTTPS"| client_0
client_0 -->|"Signs in with PKCE · HTTPS"| idp_1
gw_4 -->|"Fetches JWKS · HTTPS"| idp_1
gw_4 -->|"Fetches certificates · HTTPS"| secrets_7
gw_4 -->|"Exports (OTLP) · OTLP"| tsdb_8
tsdb_8 -->|"Supplies metrics · HTTP"| alerting_9COMPONENT STACK (10)
- API ClientSTATEFULCalls the API from an untrusted network
- Identity provider (IdP)STATEFULSigns users in and issues the JWT
- Resource serverSTATELESSBackend subgraph behind the gateway
- Policy decision point (PDP)STATELESSAllows or denies by scope; on error, fail closed
- API gatewaySTATELESSChecks the JWT, limits calls, uses a circuit breaker
- Rate limiterSTATEFULToken bucket per client; on error, fail open
- GraphQL federationSTATELESSComposes subgraph replies into one response
- Secrets managerSTATEFULHolds the gateway TLS certificates and keys
- Time-series database (TSDB)STATEFULStores request, error and latency series
- AlertingSTATEFULPages on-call on errors, latency or silence
REQUEST & DATA FLOW (15)
- API Client → API gateway (Calls with a JWT)[HTTPS]
- API gateway → Policy decision point (PDP) (Asks if allowed (mTLS))[gRPC]
- Policy decision point (PDP) → API gateway (Returns decision)[gRPC]
- API gateway → Rate limiter (Asks for limit (mTLS))[gRPC]
- Rate limiter → API gateway (Returns decision)[gRPC]
- API gateway → GraphQL federation (Forwards (mTLS))[HTTP/2]
- GraphQL federation → Resource server (Queries (mTLS))[HTTP/2]
- Resource server → GraphQL federation (Returns data)[HTTP/2]
- GraphQL federation → API gateway (Returns reply)[HTTP/2]
- API gateway → API Client (Reply or 403/429/503)[HTTPS]
- API Client → Identity provider (IdP) (Signs in with PKCE)[HTTPS]
- API gateway → Identity provider (IdP) (Fetches JWKS)[HTTPS]
- API gateway → Secrets manager (Fetches certificates)[HTTPS]
- API gateway → Time-series database (TSDB) (Exports (OTLP))[OTLP]