Guide

Two questions sit under every system design. Is it up? Is it fast? Both sound like yes-or-no questions, and both are really statistics. "Up" is a fraction of time or requests that succeed. "Fast" is a spread of response times, and the slow end of that spread matters most.

The pages below give you the math behind both answers. You'll learn what each extra nine costs in downtime, how availability multiplies across services, why averages mislead, and how fan-out makes a rare slow call the common case.

Consider a checkout that is 99.95% available on its own but calls five services at 99.9% each. The whole request is only about 99.45% available, roughly 4 hours of failure a month. Every hard dependency lowers the ceiling. The same math shows up again in the speed question, where one slow call out of many can become the user's experience. The pages below build on each other, so read them in order.

Concepts on this topic

StepConceptWhat it answers
1Nines and downtimeHow much downtime does a target allow?
2MTBF and MTTRShould you prevent failures or recover faster?
3Percentiles and tail latencyWhy is the average the wrong number?
4Composing availabilityWhat happens when services depend on each other?
5Tail latency amplificationWhy does fan-out make slow calls common?
6Taming the tailHow do you keep answering when some parts are slow?
7Latency budgetsHow does one end-to-end target split across hops?

Common mistakes

  • Quoting one latency number. Name the percentile and where you measured it. "40 ms" can mean almost anything.
  • Counting only your own uptime. Your service's availability is capped by the hard dependencies it can't run without.
  • Trusting redundancy blindly. Two replicas only help when their failures are independent.

Design-time order

Pick availability and latency targets before you draw the architecture. The targets decide how many hard dependencies you can afford, how much redundancy you need, and whether you need multiple regions.

In an interview, these numbers make requirements concrete. Saying that a read path targets p99 under 200 ms and 99.99% availability, with at most two hard dependencies, signals experience.

Key takeaways

  • Four nines allow about 4.3 minutes of downtime a month, so automation matters more than heroics.
  • Series dependencies multiply availability. Parallel replicas help only when their failures are independent.
  • Averages hide pain. Use p50, p99 and p99.9.
  • Fan-out amplifies the tail. With 100 parallel calls, a backend's p99 becomes the user's median.
  • Recovery time is often the cheapest path to another nine.

Further learning

The Tail at Scale (Dean and Barroso) is the paper behind most of these pages.

Gil Tene's talk explains why most latency measurements are wrong, including coordinated omission and averaged percentiles.

"How NOT to Measure Latency" by Gil TeneStrange Loop Conference
Site Reliability Engineering: Embracing RiskDiscover the concept of embracing risk in the context of service reliability and how to effectively utilize error budgets for a more resilient system.sre.google Site Reliability Engineering (Google SRE book)Go through the complete table of contents of sre Google book, outlined are the key topics and insights covered in this essential resource for SRE professionals.sre.google Timeouts, retries and backoff with jitter (Amazon Builders' Library)How Amazon uses timeouts, retries, and exponential backoff with jitter to handle transient failures without overwhelming struggling services.aws.amazon.com