Site Reliability Engineering interview question · Most asked

What is load shedding, and how does graceful degradation work?

Summary

Load shedding deliberately rejects some work when a service is overloaded so that the rest succeeds, instead of everything slowing down and failing. Graceful degradation keeps the core experience working by turning off expensive or optional features under stress.

Longer Answer

Techniques: limit concurrent requests per instance and return 429/503 quickly when full; prioritise traffic (checkout over recommendations, user requests over batch jobs); drop requests that have already exceeded their deadline; serve cached or simplified responses; and turn off non-essential features with flags.

The key insight: an overloaded server that accepts everything ends up serving nothing within its deadline. Rejecting early is cheaper than timing out late. Clients must back off when they receive these responses, or shedding just generates retries.

Key Points

  • Reject early to protect the rest.
  • Prioritise critical traffic.
  • Degrade optional features.
  • Clients must back off.

Deep dive: Resilience Patterns

More most-asked Site Reliability Engineering questions

← All Site Reliability Engineering questions