Course contentsShow
← System Design
Lesson 1061 of 1,91927. Circuit Breakers and BulkheadsFree lesson

Fallback Strategies

Implementing graceful degradation with cached responses, default values, or alternative service paths when circuit is open.

Fallback Strategies

You'll learn how to keep your system usable even when a circuit breaker is open and blocking requests to a failing service.

When a circuit breaker enters the open state, it's not enough to just reject requests—your users still need something. Fallback strategies define what happens when the normal path is unavailable. Think of it like a restaurant running out of your favorite dish: instead of sending you away hungry, they offer you a similar alternative or a default option.

Core Fallback Approaches

Cached Responses: Return stale but acceptable data from a cache. If your product catalog service is down, serve yesterday's product listings rather than showing nothing. Users get slightly outdated information instead of errors.

Default Values: Provide safe, generic responses. When a personalization service fails, fall back to a general homepage layout instead of a personalized one. The experience degrades gracefully rather than breaking completely.

Alternative Service Paths: Route to a backup service or simplified version. If your primary recommendation engine is down, fall back to "trending items" or "popular products" from a simpler, more reliable service.

Implementation Considerations

Your circuit breaker implementation triggers the fallback logic when the circuit opens. The fallback should be:

  • Fast: Avoid adding more latency
  • Reliable: Don't depend on another potentially failing service
  • Acceptable: Provide value even if degraded

Fallbacks work hand-in-hand with the half-open state—while the circuit breaker tests if the service recovered, fallbacks keep users served.

Key Takeaway: Fallback strategies transform hard failures into graceful degradation by providing cached data, defaults, or alternative paths when circuits are open, keeping your system functional even when dependencies fail.