ARCHOS 525 BLUEPRINT · /d/dgm_resilience-timeouts-breakers-bulkheads-shedding
Orders API (timeouts, circuit breaker, bulkhead and load shedding)
9 COMPONENTS · 10 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_resilience-timeouts-breakers-bulkheads-shedding) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_resilience-timeouts-breakers-bulkheads-shedding)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_resilience-timeouts-breakers-bulkheads-shedding" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Orders API (timeouts, circuit breaker, bulkhead and load shedding) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0[("Mobile Client")]
provider_1[("Payment Provider")]
gw_2["API gateway"]
orders_3["Resource server"]
bulkhead_4["Bulkhead"]
breaker_5["Circuit breaker"]
metrics_6[("Time-series database (TSDB)")]
alerting_7[("Alerting")]
capacity_8["Capacity Estimate"]
client_0 -->|"1. Calls with a JWT · HTTPS"| gw_2
gw_2 -->|"2. Forwards · gRPC"| orders_3
orders_3 -->|"3a. Takes slot · HTTP/2"| bulkhead_4
orders_3 -->|"3b. Sheds with 503 · gRPC"| gw_2
bulkhead_4 -->|"4. Admits within limit · HTTP/2"| breaker_5
breaker_5 -->|"5a. Calls with key · HTTPS"| provider_1
breaker_5 -->|"5b. Fails fast when open · HTTP/2"| bulkhead_4
metrics_6 -->|"Scrapes counters · HTTPS"| orders_3
metrics_6 -->|"Scrapes state · HTTPS"| breaker_5
metrics_6 -->|"Supplies metrics · HTTP"| alerting_7COMPONENT STACK (8)
- Mobile ClientSTATEFULRetries once with backoff and jitter
- Payment ProviderSTATEFULThird party; one charge per key
- API gatewaySTATELESSChecks the JWT, sets a 2.5 s deadline
- Resource serverSTATELESSOrders API; sheds load past 40 in flight
- BulkheadSTATELESSOwn pool of 20 calls; a full pool rejects
- Circuit breakerSTATELESSOpens after 5 failures, probes at 30 s
- Time-series database (TSDB)STATEFULStores shed, timeout and breaker counts
- AlertingSTATEFULPages on-call when a breaker opens
REQUEST & DATA FLOW (10)
- Mobile Client → API gateway (Calls with a JWT)[HTTPS]
- API gateway → Resource server (Forwards)[gRPC]
- Resource server → Bulkhead (Takes slot)[HTTP/2]
- Resource server → API gateway (Sheds with 503)[gRPC]
- Bulkhead → Circuit breaker (Admits within limit)[HTTP/2]
- Circuit breaker → Payment Provider (Calls with key)[HTTPS]
- Circuit breaker → Bulkhead (Fails fast when open)[HTTP/2]
- Time-series database (TSDB) → Resource server (Scrapes counters)[HTTPS]
- Time-series database (TSDB) → Circuit breaker (Scrapes state)[HTTPS]
- Time-series database (TSDB) → Alerting (Supplies metrics)[HTTP]