Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Courses/Reliability and Failure
Lesson 9 of 24

Graceful degradation and failing dependencies

Decide on purpose what happens when something you depend on is down.

15 min read

Fail open or fail closed

When a dependency fails, you choose: fail open (skip the check and keep serving) or fail closed (refuse the request). A rate limiter usually fails open so an outage of its counter store does not take down the API; a payment check must fail closed.

Isolate slow dependencies

A slow dependency is often worse than a dead one, because it ties up threads and connections. Use timeouts on every call, retries with exponential backoff, circuit breakers that stop calling a failing service, and separate queues or pools per dependency so one bad provider cannot starve the others.

Degrade, do not disappear

Serve stale data, hide a non-essential feature, or queue work for later. Users forgive a missing recommendation widget; they do not forgive a blank page.

Key takeaways

  • Choose fail-open or fail-closed per dependency, and write it down
  • Timeouts, backoff and circuit breakers stop slow dependencies spreading
  • Prefer stale or partial results over errors

Sign in to track lessons and earn badges.

Bulkheads and fault isolationOverload and queueing theory basics

Challenge checkpoint

Course: 0/24 lessons · 0/10 challenges0%

Build it on the canvas, pass the review (70+) and mark it complete to count it toward the course badge.

  1. 2/10Design a Weather API ProxyCache provider responses and serve stale data behind a circuit breaker when the paid upstream API is down.Easy
All 10 challenges →