← Lessons

quiz vs the machine

Gold1440

Concurrency

The Graceful Degradation Concurrent

Designing a concurrent system to lose features instead of collapsing when a dependency slows.

5 min read · core · beat Gold to climb

Bending instead of breaking

A system shows graceful degradation when, under stress or partial failure, it gives a reduced service rather than failing completely. The opposite is a system that works perfectly until it suddenly does not.

Degrading concurrent work

When one dependency in a fan out slows down, a naive request waits for all parts and stalls. Graceful design lets the request return a partial result:

  • Use a timeout on each branch so a slow one does not block the whole response.
  • Serve a fallback or cached value for the missing branch.
  • Drop optional enrichments first and keep the core answer intact.

Avoiding shared collapse

A degraded path must not depend on the same exhausted resource that is failing. If the fallback hits the same overloaded database, it degrades nothing. Keep fallbacks independent so the core survives when the extras cannot.

Key idea

Graceful degradation returns a smaller answer under stress by timing out and dropping optional work, as long as the fallbacks do not lean on the failing resource.

Check yourself

Answer to earn rating on the learn ladder.

1. What does graceful degradation give under stress?

2. Why must a fallback be independent of the failing resource?