Resilience patterns control how failure crosses service boundaries. A slow or overloaded dependency is ordinary in a distributed system. Without a response policy, waiting calls consume connection pools and worker capacity while retries add more load.

Each mechanism answers a different signal. Circuit Breaker stops calls during sustained dependency failure, while Rate Limiting caps admitted demand. Timeouts bound waiting, and careful retries absorb brief faults. In .NET, Polly and Microsoft.Extensions.Http.Resilience can compose those policies into one HttpClient pipeline.

Choose a Response by Failure and Overload

software architecture resilience patterns

SignalResponseFailure containedNew cost
One call exceeds its latency budgetTimeoutReleases caller capacity and bounds tail latencyCan abandon work that still completes downstream
A safe operation fails transientlyRetry with capped exponential backoff and jitterHides brief transport or overload faultsAdds load and latency. Can duplicate unsafe writes
A dependency fails persistentlySoftware Architecture/Patterns/Resilience Patterns/Circuit BreakerStops repeated calls and lets the dependency recoverFast failures during the open interval
One workload exhausts shared resourcesBulkheadPreserves capacity for other workloadsReserved capacity may sit idle
Incoming demand exceeds safe throughputSoftware Architecture/Patterns/Resilience Patterns/Rate Limiting or load sheddingRejects work before queues and latency grow without boundSome valid work receives 429 or degraded service
Producer outruns consumerBackpressureMakes demand follow downstream capacityPropagates slowdown or requires bounded buffering
Optional capability failsFallback or graceful degradationKeeps the critical path availableStale, partial, or lower-quality output

“Let it crash” is a supervision choice. It works only when the failed unit is isolated, restart loops are bounded, state recovery is defined, and callers still receive a controlled outcome.

Map Mechanisms to Failure Domain and Recovery

Fault tolerance starts with the unit that can fail and the recovery objective:

Failure domainMechanismContinues during failure?Recovery requirement
Process or instanceMultiple instances plus health-aware load balancingYes, if capacity remains and health checks remove the failed instanceReplace capacity and preserve request idempotency
Availability zoneReplicas spread across zonesYes, if quorum and routing tolerate one zone lossRebuild replicas without overloading survivors
RegionActive-passive or active-active regional designDepends on failover mode and data replicationDefine RTO, RPO, DNS/routing convergence, and split-brain controls
Storage deviceMirroring, erasure coding, or replicated storageDepends on redundancy level. RAID 0 provides noneReplace media and rebuild before another failure
Dependency overloadAdmission control, queues, backpressure, and degradationCritical functions can continueDrain bounded work and restore optional features gradually
Software defectIsolation, canary rollout, rollback, and feature flagOnly outside the affected blast radiusStop rollout, revert safely, and preserve compatible state

Replication can copy deletion or corruption, so it does not replace a backup. Monitoring detects trouble. Recovery still needs a mechanism. The design is credible only after the stated failure domain has been exercised and recovery time and data loss have been measured.

References

3 items under this folder.