Graceful Degradation
When part of a system fails, the rest need not. Degrade features deliberately so users keep what still works.
What you'll learn
- Define graceful degradation and contrast it with hard failure
- Rank features so the right ones survive a partial outage
- Apply fallbacks, caching, and feature toggles
- Communicate a degraded state clearly to users
6 min
Partial service beats none
Graceful degradation means a system continues to provide its core function even when some components fail, rather than collapsing entirely. A shopping site whose recommendation engine is down should still let people browse and check out; losing a nice-to-have feature is a far better outcome than an error page for everyone.
The alternative — hard failure, where one broken dependency takes down the whole experience — magnifies small problems into large ones. Designing for degradation means deciding in advance what your system can live without, so a failure in a minor feature never blocks a major one.
Rank your features
You cannot protect everything equally, so decide what matters most. Sort features into tiers: the essential path that must keep working, and the enhancements that may be shed under stress. For an integration, submitting and tracking the core record is likely essential, while enrichment, suggestions, or analytics are candidates to drop first.
This ranking should be an explicit, agreed list, not an accident of which code happens to fail first. When you know the priority order ahead of time, shedding load during an incident becomes a deliberate choice rather than a scramble. Pair it with handling partial failures for the call-level mechanics.
Fallbacks and toggles
Several techniques deliver degradation. A fallback returns a sensible default when a dependency is unavailable — a slightly stale cached value, or an empty result the caller can handle. A feature toggle lets you switch off an expensive or fragile feature without a deploy. Caching lets you keep serving recent data when the source is briefly unreachable.
try:
recs = recommend(user)
except DependencyError:
recs = cached_or_empty(user) # degrade, do not fail
render(page, recs)The pattern is the same throughout: catch the failure, substitute something acceptable, and keep going.
Tell the user honestly
Degradation should be visible, not silent. If a feature is temporarily unavailable, say so plainly rather than showing stale data as if it were live or failing in a confusing way. A short, honest message — "recommendations are temporarily unavailable" — sets expectations and reduces support load.
Where the degradation stems from a platform dependency, point users to authoritative status so they can see it is being handled. Clear communication turns a degraded experience into a tolerable one; silence turns it into a flood of confused reports and lost trust.
Key takeaways
- Keep the core function working even when components fail
- Rank features in advance so the right ones survive
- Use fallbacks, caching, and feature toggles to shed load
- Surface degraded state honestly instead of hiding it
- Treat hard failure of the whole system as the worst outcome
FAQ
Is graceful degradation the same as a circuit breaker?
They are related. A circuit breaker is one mechanism that enables degradation by cutting off a failing dependency quickly, so your fallback can take over instead of every request hanging.
Is stale cached data ever acceptable?
Often yes, if you label it. Showing recent data during a brief outage usually beats showing nothing, provided users understand it may not be current and the data is not safety-critical.
How do I decide what to degrade first?
Rank features by how essential they are to the core user task. Shed the least essential first. Agreeing this order before an incident makes load-shedding a calm decision rather than a panicked one.
Ready to build?
Read the API reference, grab the OpenAPI spec, and ship a resilient integration.