Q1 · How do you design a resilient system that survives external dependency failures?

Back to 24 Architecture Questions.

The question is not “list resilience patterns”. The axis it turns on, from the index: which layer owns each budget, and what caps it. Every call to an external dependency spends three budgets from your system:

A good answer names an owner and a cap for each. A bad answer lists patterns with no budget attached to any of them.

Each mechanism guards exactly one budget, and the fallback is a branch, not an afterthought:

Who owns each budget A request passes through a bulkhead pool, a caller-set timeout with capped retries, and a circuit breaker before reaching the external dependency. When the breaker is open the call is not made and a fallback is served instead. FIGURE 1 WHO OWNS EACH BUDGET CAPACITY TIME · ATTEMPTS ATTEMPTS · GLOBAL Request caller's work Bulkhead isolated pool Timeout + Retry caller-set, capped Circuit Breaker fail fast while open Dependency external, may hang breaker open, no call Fallback decided in advance

What the answer should contain

Timeouts, set by the caller. Never rely on the dependency’s own timeout. The caller’s timeout must be shorter than the deadline the caller can afford, and it should propagate downward: if a request has 300 ms left, an internal call gets less than that, not a fresh 30 s.

Retries, capped and jittered. Two or three attempts, exponential backoff with jitter. Retry only errors that are plausibly transient: connection failures, 429, 503. Retry only operations that are safe to repeat, or make them safe with an idempotency key. Uncapped or synchronous retries are how a struggling dependency turns into a dead one: your retries are its load.

Circuit breaker. When the failure rate crosses a threshold, stop calling, fail fast, and probe occasionally until it recovers. It is the global version of the attempt budget: instead of every request spending its own retries against a dead dependency, one mechanism spends them for everyone.

Bulkhead. A separate connection or thread pool per dependency, so a slow dependency exhausts only its own pool. This is the capacity budget: one bad dependency should never be able to consume every worker in the process.

Fallback, decided in advance. What do you serve when the dependency is down: stale cache, a default value, a reduced feature set, or an honest error? The answer should name which one, per dependency, and note that this is a product decision, not an infrastructure one.

Shed load early. When everything is slow, reject work at the edge (503, bounded queue) rather than letting it pile up inside. A system that queues unboundedly is a system that dies slowly instead of failing fast.

Ideas worth mentioning out loud

Follow-ups to expect

Red flags in an answer

Sources