How to Design Degradation Strategies
Ladder from full features to cached, simplified, and queued modes, drive the ladder by dependency health, and make degraded states visible to users.
On this page
Introduction
When a dependency fails, the binary choice, work or error, wastes the middle ground where most product value actually lives. The recommendation engine is down, but the page without recommendations is still a working page. The search index is stale, but yesterday’s results answer most queries correctly. The email service is down, but the order can be accepted with the confirmation queued. Degradation is the practice of designing those middle states deliberately, so that dependency failure reduces capability instead of terminating the product. The design has four parts: a ladder, per feature, of progressively cheaper modes; an actuator, wiring dependency health to ladder position automatically; a write path, because degrading reads is easy and degrading writes is where the craft is; and visibility, because a degraded system that hides its state serves stale data with false confidence and erodes user trust precisely when it is being tested. This tutorial builds all four, with the cache-directive mechanics, the health wiring, the durable queue for writes, and the honest signaling that makes degradation an engineered mode rather than a silent lie.
Build the ladder per feature
The ladder is an inventory exercise done in calm conditions, and it is per feature because features shed different things. For each user-facing capability, enumerate the full mode and everything it can lose, in order of value: fresh data, the first rung down is cached or stale data with an age marker; optional enrichment, recommendations, related items, personalization, the second rung is the page without them; synchronous verification, fraud checks, inventory precision, the third rung is accept-then-verify, proceeding with a cheaper or deferred check; full interactivity, the final rung before failure is read-only mode, browsing and cached views without mutations. A search product’s ladder might run full index, index minus freshness, top-results-only cache, static curated results, error. Each rung needs three definitions: what the user sees, what data it requires, and what must be true to occupy it, the entry conditions that the actuator evaluates. The inventory is cheap to write and expensive to improvise, because the 3 a.m. version of rung design is a disabled feature and an error page, which is the failure mode degradation exists to prevent.
Serve stale with cache mechanics
The read-side rungs lean on cache-directive mechanics that make staleness explicit and bounded. stale-while-revalidate lets a cache serve the expired copy while refreshing in the background, converting an expiry cliff into a smooth refresh. stale-if-error lets a cache keep serving past expiry when the origin is unreachable, which is degradation implemented in the caching tier itself.
Cache-Control: public, max-age=60, stale-while-revalidate=600, stale-if-error=86400
The application-side version is the same policy as a wrapper around the fetch path: a cache layer that returns stale entries when the refresh call fails, tags them with their age, and bounds how stale it will serve per content class, prices may be at most five minutes stale, articles at most a day. The negative-cache pattern covers the failure dimension of freshness: cache the fact that something is unavailable briefly, ttl: 30s on misses for a down dependency, so a dead dependency does not get hammered with retries for data the system has already failed to fetch once. Sizing these windows is a product decision with numbers, and the ladder document is where the numbers live, because a staleness bound that exists only in code review discussions does not govern anything.
Wire health to the ladder
Degradation that waits for a human is an outage with a pause. The actuator is the wiring between dependency health signals and ladder position, and its inputs are the resilience machinery the system already has: circuit breaker state, open means the dependency is unavailable, half-open means probing recovery; sustained error rate, a sliding window crossing a threshold; latency percentile breaches, a dependency that answers but too slowly to occupy its full-feature rung. The mapping is declarative, a table from signal conditions to rung, so it is reviewable like code and testable like code.
const RUNGS = [
{ mode: 'full', requires: { pricing: 'closed', inventory: 'closed' } },
{ mode: 'cached-pricing', requires: { pricing: 'any', inventory: 'closed' } },
{ mode: 'accept-queue', requires: { pricing: 'any', inventory: 'any' } },
] as const;
export function currentRung(breakers: BreakerStates): Rung {
return RUNGS.find(r => satisfies(r.requires, breakers)) ?? RUNGS[RUNGS.length - 1];
}
Two timing details make the actuator safe. Hysteresis: climbing down the ladder should be faster than climbing back up, one bad second sheds load, one good second does not restore it, so recovery requires sustained health, which prevents flapping between modes that users see as a flickering page. And cooldown on the way down: entering a degraded rung should latch for a minimum period, so a dependency with jittery failure rates produces a stable degraded mode rather than an oscillating one. Manual overrides exist on top of the automatic mapping, for maintenance windows and for the rare cases the signal wiring is wrong, but the default must be automatic because the median time for a human to notice and correctly toggle a degradation flag is longer than the median dependency blip.
Degrade the write path with a queue
Reads degrade into staleness; writes degrade into deferral. The pattern is the durable queue: when the write dependency, email, inventory reservation, downstream ledger, is unavailable, the system accepts the write into persistent storage with the full intent, and a replay worker delivers it when the dependency recovers. The design obligations are explicit. Disclosure: the user is told their action is accepted and will be confirmed, because an order that silently queues and later fails violates the trust the queue exists to protect. Idempotency: replay must be idempotent, the downstream needs an idempotency key or natural key, because the queue’s at-least-once delivery redelivers under crash recovery. Ordering and staleness: some writes go stale while queued, a price confirmation captured at checkout may be invalid by delivery time, so the replay must validate freshness and route genuinely-stale writes to a reconciliation flow rather than blind-delivering them. Bounds: queue depth limits and age limits, because unbounded deferral is a slow outage wearing a success message, and when the bound is hit the honest failure finally surfaces. The queue is the difference between an email outage being invisible to users and the same outage costing every order placed during it.
Make degraded states visible
Degradation that hides itself serves wrong data with full confidence, and the wrongness compounds: users act on stale prices, caches treat degraded responses as authoritative, and monitors see a healthy system while the product quietly loses its guarantees. Visibility has three audiences. Users: a UI state, subtle for mild staleness, explicit for queued writes, an as-of timestamp on stale data, a confirmation-pending state on queued orders, honesty calibrated to actionability, visible enough to trust, quiet enough not to alarm. Caches and intermediaries: HTTP signaling, the stale response carries its cache directives honestly, and a 203 Non-Authoritative Information or a custom header marks transformed or degraded representations so downstream caches do not treat them as canonical. Operations: the rung position is a first-class metric, per feature, graphed and alerted, because a system sitting in degraded mode is an incident in progress even when error rates are zero. The degradation dashboard answers the question incident responders actually ask first, what is the product doing right now, with the rung inventory rather than a reconstruction from dependency graphs.
Rehearse the rungs
Degradation code paths are the least-executed code in the system, which makes them the buggiest, and a rung that fails when first exercised during a real outage is worse than no rung, because it converts a partial failure into a confusing full one. The rehearsal is the failure-injection drill aimed at the ladder: take pricing down in staging and assert the product occupies the cached-pricing rung, serves bounded-stale data with the as-of marker, and climbs back with hysteresis, not instantly, not never. Queue the write path and assert the replay delivers exactly once downstream, the user saw the pending state, and the genuinely-stale write routed to reconciliation rather than delivery. Verify the visibility surfaces in each mode, because the as-of timestamp and the pending state are rendered by the same frontend that has never run against a degraded backend. The rung inventory makes rehearsal cheap: every rung is a test scenario by construction, and a quarterly pass through the ladder with fault injection keeps the middle ground, the entire value of degradation, actually standing on the day it is needed.
it('occupies cached-pricing when pricing opens', async () => {
breakers.trip('pricing');
const page = await renderProduct(42);
expect(page.rung).toBe('cached-pricing');
expect(page.pricing.asOf).toBeLessThan(Date.now() - 60_000);
});
Common pitfalls
- **Improvised degradation at 3 a.m. ** Rungs designed during the incident are a disabled feature and an error page, the failure mode degradation prevents.
- **Hidden staleness. ** Users and caches trust data that is quietly wrong; the as-of marker is the honesty mechanism.
- **Instant recovery. ** No hysteresis means flicker between modes, which reads as a broken page rather than a resilient one.
- **Human-actuated rungs. ** The notice-and-toggle loop outlasts the median dependency blip; wire health signals to the ladder.
- **Unbounded write queues. ** Deferral without depth and age limits is a slow outage wearing a success message.
- **Unrehearsed rungs. ** The least-executed code is the buggiest; drill the ladder before the dependency does it for you.
Conclusion
Degradation design converts dependency failure from product termination into capability reduction, and it is built in calm conditions. Inventory the ladder per feature, full freshness, cached staleness, shed enrichment, deferred verification, read-only, with entry conditions a machine can evaluate. Wire dependency health, breaker state, error budgets, latency breaches, to ladder position automatically, with hysteresis so recovery is deliberate and manual overrides for the rare wrong wiring. Degrade reads through bounded staleness with honest age markers, and degrade writes through durable queues with disclosure, idempotent replay, and explicit depth and age limits. Make every rung visible to its three audiences, users, caches, and operations, and rehearse the ladder with fault injection, because the middle ground only pays if it stands up when hit. Systems with engineered degradation keep serving through dependency failures that take binary systems entirely offline, and their users mostly never know.
Sources: RFC 9111: HTTP caching, MDN: Cache-Control header, Istio: circuit breaking.
FAQ
- How is degradation different from failure?
- Failure returns an error; degradation returns a less capable but still useful answer: cached data, fewer recommendations, a queued write. The product keeps working with reduced fidelity, which users tolerate far better than errors they cannot act on.
- When should degraded mode activate?
- Automatically, from dependency health signals such as circuit breaker state, sustained error rates, or latency thresholds. Manual toggles exist for maintenance and rollback, but requiring a human to notice and act turns seconds of automatic protection into minutes of outage.
- What about data freshness during degradation?
- Bound it explicitly: stale-while-revalidate windows, maximum stale ages per content class, and a visible as-of timestamp. Unbounded staleness is a correctness bug wearing a resilience costume.
Report a problem with this articleOpens a pre-filled issue on GitHub.