What is graceful degradation, and when would you fail open versus fail closed?
What they are really testing: Whether you design for partial failure (degrade rather than crash) and can reason about the fail-open vs fail-closed trade-off per dependency, security versus availability.
A real interview question
What is graceful degradation, and when would you fail open versus fail closed?
What most people say
drag me
“Graceful degradation means the app keeps working when something fails.”
It states the goal but gives no mechanism and ignores fail open vs fail closed, which is the real judgment. Failing open on an auth check would be a security hole; the answer needs the per-dependency trade-off.
The follow-ups they ask next
Give an example where fail open would be a serious bug.
An authorization check: if the authz service is down and you fail open, you grant access to everyone, a security breach. Auth/payments must fail closed; only non-critical features should fail open.
How do you keep a feature working when its dependency is down?
Serve a cached or default response, disable just that feature while keeping the rest, or queue the work for later. The core request still succeeds in a degraded mode.
What the interviewer is listening for
- Degrade to reduced function, not crash
- Explains fail open vs fail closed
- Decides per dependency (auth fails closed)
What sinks the answer
- Goal only, no mechanism
- No fail open/closed reasoning
- Would fail open on auth/payments
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“Graceful degradation = [on a non-critical failure, keep the core working with reduced function (cached/default data, hide a feature), not crash]. [Fail open = proceed on failure, favor availability, for non-critical deps like recommendations]. [Fail closed = deny on failure, favor safety, for auth/payments]. Decide [per dependency by the cost of being wrong]; never fail open on security.”
Keep going with reliability
Foundation
What is a Region versus an Availability Zone, and why does the difference matter?
Foundation
What is the difference between vertical scaling and horizontal scaling, and when would you reach for each?
Foundation
What does "highly available" actually mean, and how do you achieve it?
Foundation
Why are stateless services easier to scale and make reliable than stateful ones?
Junior
How should a service retry a failed call to a dependency, and what is a retry storm?
Junior
What is idempotency, and why does it matter for reliable distributed systems?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free