Skip to content

Reliability

Every call to another service can fail, or never come back. The protections in this module decide what a caller does then: how long it waits, whether it tries again, how it stops tries from piling up on a dependency that is already struggling, and how it keeps one failing part from taking the rest down. Done well they hide brief failures. Done badly they turn a small one into an outage.

You will work with a live retry lab that goes from one attempt to three layers of retries, with a retry budget and a circuit breaker, with a sorting exercise, a quiz and two C# examples, a retry policy and a circuit breaker. Every lesson has a moment where you make the dependency fail and watch what the callers do.

  1. Timeouts and retries (20 min). What a timeout bounds, how long it should be, and what a retry buys in a brief failure and in an outage.
  2. Backoff and jitter (22 min). Waiting longer after each failure, why clients that failed together retry together, and what jitter changes and does not change.
  3. Retry amplification and retry budgets (22 min). Why retries in every layer multiply, and how a budget caps them.
  4. Circuit breakers (22 min). Closed, open and half-open, a probe that fails and one that succeeds, and what a breaker costs.
  5. Bulkheads (16 min). A pool for each dependency, sized with Little’s Law, so that one silent dependency cannot use up the rest.
  6. Failover (18 min). Moving the work when a component is lost: detection time, spare capacity, and a wrong decision.
  7. Recap and quiz (12 min). The module in one page, a checklist, and a quiz.
  • Choose a timeout from a latency percentile, and say how many calls a silent dependency holds from the rate and the timeout.
  • Decide which failures to retry, how long to wait between tries and why the wait is random.
  • Work out the worst-case attempts of a chain of retrying layers, and cap them with a retry budget.
  • Read a circuit breaker’s states and say what it saves and what it costs.
  • Size a bulkhead, and say what spare capacity a failover needs.

All the numbers in the labs are illustrative. They are for comparing choices, not for forecasting any real product.

Built by GhaziAlibi.

© ShardCraft. All rights reserved.