techdiagrams.net
← All templates

Anatomy of a safe RPC

One call path wearing every stability pattern: timeout, retry budget, circuit breaker, bulkhead, hedged reads, graceful fallback and deadline propagation.

Open in editor — free, no login Download JSON
THE DANGEROUS DEPENDENCY — POOLED AND FUSEDPOST /order · 1s budgetdeadline: 800ms leftisolated poolcharge · 500ms capread cataloghedge at p95on failure: serve staleMobile app1s total budgetEdge Gatewaystamps deadline: 800msOrders APIretry budget: 10%/sPayments client poolbulkhead · 20 threads maxPSP / Gatewayflaky third partyCatalog replica Aprimary read pathCatalog replica Bhedge targetFallback cachelast-good responsesthe deadline ladder:client 1000ms → gateway 800ms → PSP call 500ms.Every inner timeout is SHORTER than its caller's —reverse that and you build zombie work.read the badges: every edge declares its armor.An unlabeled remote call is an unmanaged risk.

What this design does

Most outages travel over a single unprotected remote call. This template is that call, armored: the gateway stamps a deadline that every hop honors and shrinks, retries are budgeted instead of infinite, the flaky dependency sits behind a circuit breaker inside its own bulkhead pool, reads hedge to a second replica when the first is slow, and when everything fails a cache serves the last good answer instead of an error page. The pattern badges on each edge aren't decoration — they ARE the design.

The patterns it composes

Import it, attach your own numbers, and verify the design against failures — or read the engineering notes.