Graceful Degradation

The art of returning a partial / cached / fallback response instead of failing.

Overview

Serve less instead of failing completely

Graceful degradation is the discipline of 'serve less when you can't serve everything' instead of 'fail completely.' It is often the difference between an outage and a recoverable incident.

Picture one request that needs a dependency. If the dependency is healthy, the request gets the full response. If it is not, the next move depends on how critical that dependency is. A security or payment dependency fails the request. An enrichment dependency is replaced with cached, partial or default data. Logging and analytics are skipped silently.

> [!WARNING] The anti-pattern is silent degradation that customers detect before you do. Always alert on degradation.

Key concepts

  • Cached fallback
  • Partial response
  • Default response
  • Quality SLI
  • Header signaling
  • Per-feature policy

Interview questions

  • Walk me through how you'd design a feature with graceful degradation.
  • When should a service NOT degrade gracefully?
  • How do you avoid "silent degradation"?

Sign up free to read the full topic

More SRE topics

Start free on Cariara · Coding problems · System design studio