← Concepts

阅读中文版本

Graceful Degradation

Graceful degradation preserves core functionality by shedding optional features when capacity or dependencies fail, keeping the service useful under stress.

reliability

Definition

Graceful degradation is a design approach in which a system reduces non-essential functionality under failure or overload instead of failing completely.

Context and scope

Applied to user-facing services with mixed criticality, such as commerce, media, and dashboards, and to systems with hard dependencies on third parties.

Common misconceptions

  • Graceful degradation means hiding errors from users
  • It can be added after an outage without design changes
  • Every feature must degrade, which implies all features are equally important

Anti-patterns

  • Shedding critical operations while keeping decorative ones
  • Degrading silently without telemetry or user messaging
  • Assuming fallback paths work because they exist in code

Related concepts

Related examples

Authoritative source

https://sre.google/sre-book/handling-overload/

The core idea

Graceful degradation keeps the essential service alive when part of the system cannot keep up. Instead of returning errors for everything, the system returns fewer features, lower fidelity, or cached data. A storefront might stop personalized recommendations but keep search and checkout working. A dashboard might show stale metrics rather than a blank page. The design question is what users must still be able to do when the ideal path is unavailable.

Set priorities first

Degradation only works if the team has agreed on tiers. Classify operations as critical, important, and optional. Critical paths such as authentication, payment, and data durability must not be shed. Important paths may run with reduced quality. Optional features, recommendations, and analytics are the first to go. Without an explicit ranking, engineering discovers priorities during the outage, usually by accident.

Techniques

Use timeouts and circuit breakers to stop waiting on a failing dependency. Serve cached or stale responses with a clear freshness signal. Disable expensive personalization. Return partial results with a warning instead of failing the whole request. Queue writes for later when reads must continue. Feature toggles allow operators to disable components without deploying. Each technique needs an owner and a defined recovery condition.

Design and test

Decide the fallback behavior while designing the feature, not during the incident. Test by injecting dependency failures and observing whether the degraded path works and whether users understand it. For example, a checkout that silently drops tax calculation is not gracefully degraded; it is wrong. Degradation must preserve correctness for the functions it keeps.

Limits

Degradation adds branches and failure modes. It cannot save a system whose shared bottleneck, such as a single database, has failed. Compared to fail-fast behavior, graceful degradation improves availability but complicates reasoning and testing. Use it where partial service has real user value, and keep the number of degraded states small.