Skip to main content
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
[![API Gateway (single entry point with auth, limits and a circuit breaker) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_api-gateway-design/opengraph-image)](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_9

COMPONENT STACK (10)

  • API ClientSTATEFUL
    Calls the API from an untrusted network
  • Identity provider (IdP)STATEFUL
    Signs users in and issues the JWT
  • Resource serverSTATELESS
    Backend subgraph behind the gateway
  • Policy decision point (PDP)STATELESS
    Allows or denies by scope; on error, fail closed
  • API gatewaySTATELESS
    Checks the JWT, limits calls, uses a circuit breaker
  • Rate limiterSTATEFUL
    Token bucket per client; on error, fail open
  • GraphQL federationSTATELESS
    Composes subgraph replies into one response
  • Secrets managerSTATEFUL
    Holds the gateway TLS certificates and keys
  • Time-series database (TSDB)STATEFUL
    Stores request, error and latency series
  • AlertingSTATEFUL
    Pages on-call on errors, latency or silence

REQUEST & DATA FLOW (15)

  1. API Client → API gateway (Calls with a JWT)[HTTPS]
  2. API gateway → Policy decision point (PDP) (Asks if allowed (mTLS))[gRPC]
  3. Policy decision point (PDP) → API gateway (Returns decision)[gRPC]
  4. API gateway → Rate limiter (Asks for limit (mTLS))[gRPC]
  5. Rate limiter → API gateway (Returns decision)[gRPC]
  6. API gateway → GraphQL federation (Forwards (mTLS))[HTTP/2]
  7. GraphQL federation → Resource server (Queries (mTLS))[HTTP/2]
  8. Resource server → GraphQL federation (Returns data)[HTTP/2]
  9. GraphQL federation → API gateway (Returns reply)[HTTP/2]
  10. API gateway → API Client (Reply or 403/429/503)[HTTPS]
  11. API Client → Identity provider (IdP) (Signs in with PKCE)[HTTPS]
  12. API gateway → Identity provider (IdP) (Fetches JWKS)[HTTPS]
  13. API gateway → Secrets manager (Fetches certificates)[HTTPS]
  14. API gateway → Time-series database (TSDB) (Exports (OTLP))[OTLP]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →