When the kitchen runs out of steak, a good waiter offers chicken instead of disappearing. A fallback is software’s Plan B: a pre-programmed alternative response when the preferred operation fails. It does not repair the broken dependency, but it can keep the experience moving and save a transaction. section 10.2 section 10.2.3
A fallback might return default data, use a cached response, or apply a simpler business rule. The result is often less tailored or less precise than the preferred one, so the choice should reflect what the business can afford to trade away. section 10.2.3
Save the sale
If a live shipping calculator is unavailable, an online store could charge a flat $5 shipping fee instead. The store might lose money on postage, but it can still complete a $100 sale. Similarly, a streaming homepage could show a fixed list of popular titles when personalized recommendations are unavailable. section 10.2.3
Fallbacks work alongside other resilience patterns. A timeout limits waiting; retries with exponential backoff give a failing request another chance. If those attempts fail, the fallback offers an alternative. A circuit breaker can also trigger a fallback when it opens, blocking calls to a failing dependency rather than making customers wait for each one to fail. section 10.2.3 section 10.3
Payment service outage
If a payment service is down, checkout can capture order data for later processing rather than simply throwing an error. The design must also decide what to show the customer while the order waits. A background queue is one possible Plan B; it changes when the charge happens rather than pretending the real-time payment succeeded. section 10.8 section 10.4.1
A backup is not automatically a useful fallback. On Ariane 5, the backup computer ran the same software as the primary and failed on the same calculation. A fallback needs a meaningfully different way forward, such as returning cached data, rather than repeating the same failure. section 10.7.2
Not every failure can be hidden. In a microservice aggregator, one service may fail while others still work, requiring explicit fallback logic for partial failures. The core post data, however, is required in the illustrated example, so its failure aborts the operation. section 12.7.2























