Stackbook Logo
resilienceestablished · medium operational burden

Graceful Degradation

Also known as: fallback, partial-availability

Intent

Keep delivering reduced but useful functionality when dependencies fail instead of failing the whole request.

Problem

Modern pages and APIs depend on many services, and treating every dependency as mandatory means a failure in a minor feature takes down the core experience. Users prefer a simpler page to an error page.

Forces

  • •Not all features are equally critical
  • •Dependencies fail independently
  • •Fallback paths are rarely exercised and rot
  • •Degraded results may mislead users

Solution

Overview

Graceful degradation is the deliberate design of lower-quality service levels. The system decides in advance what to drop, substitute, or simplify as dependencies become unavailable.

How it works

List the features of a request and rank them. Critical features fail the request; optional ones fall back.

product page
  price, stock      critical   -> fail request
  reviews           optional   -> cached copy, else hide
  recommendations   optional   -> global bestsellers
  personalization   optional   -> default layout

Each optional call has its own short timeout and breaker. When it trips, the handler returns the fallback and sets a degraded marker used for metrics and, where honest, UI hints. Recovery is automatic as the breaker closes.

Pitfalls

  • Fallbacks that call another unhealthy service simply move the failure.
  • Fallbacks are code that runs rarely. Test them with game days and fault injection.
  • Serving stale data without bounds can violate business rules, so set maximum staleness.
  • Hidden degradation hides outages. Emit metrics for every fallback used and alert on the rate.
  • Caching a fallback response as if it were real can poison caches after recovery.

Key takeaways

  • Decide criticality per feature before the incident.
  • Prefer fallbacks that need no network, such as static defaults or local caches.
  • Measure and alert on degraded responses.
  • Test fallbacks continuously.
  • Agree on degraded behavior with product owners in advance, because deciding what users see during an outage is a business choice and not only an engineering one.

✓ When to Use

  • •Pages composed from many independent services
  • •Features with an acceptable cheaper substitute
  • •Peak events where shedding optional work protects the core

✗ When Not to Use

  • •Correctness-critical operations such as payments
  • •Cases where stale data causes harm
  • •When no meaningful fallback exists

Pros

  • +Core journeys survive partial outages
  • +Lower perceived downtime
  • +Pairs naturally with circuit breakers

Cons

  • −More code paths to test
  • −Risk of silently serving stale or wrong data
  • −Product decisions needed per feature

Cost Profile

Infrastructure

Low, cached or static fallbacks

Operational

Medium, test and monitor fallback paths

Cognitive

Medium, many states to reason about

Failure Modes

  • Fallback path untested and fails when first used

  • Degraded mode never exits after recovery

  • Fallback depends on the same failed component

Real-World Examples

Alternatives

    Related Patterns

    • circuit-breaker
    • bulkhead

    Competency Domains

    reliability opsrequirements constraints