Graceful degradation means when a dependency fails or is slow, the system reduces functionality instead of failing entirely: e.g. show cached or default content, disable non-critical features, or return a partial response. The user still gets a useful result.
Degrade instead of fail
flowchart TB
R[Request] --> C{Recommendation API}
C -->|OK| Full[Full response]
C -->|Down| Degrade[Use default / cache / skip]
Degrade --> Partial[Partial but valid response]
Full --> User[User]
Partial --> User
Strategies
Fallback value — Use default or last-known-good (e.g. “Recommendations temporarily unavailable”).
Cache — Serve stale data when live source is down.
Disable feature — Hide or grey out the feature (e.g. “Live pricing unavailable”).
Partial response — Return what you have; omit the failing part and indicate it in the response.
flowchart LR
A[Primary service] -->|Fail| B[Circuit open / timeout]
B --> C[Fallback path]
C --> D[Cached / default / reduced]
Combine with circuit breakers and timeouts: when the circuit is open or the call times out, switch to the degraded path instead of failing the whole request.