SysDesignAtlas

Availability, SLAs & Redundancy Math

What the nines cost, why serial dependencies destroy availability, and how error budgets convert reliability from an argument into a number.

CoreMedium11 min readavailabilityreliabilitysla
Confidence

#The nines, in minutes

Availability is the fraction of time your system is actually working: uptime divided by total time. People quote it as a number of nines — "three nines" means 99.9% — and that shorthand is how availability targets get written into contracts and design docs.

The table below is worth internalising, because the interesting column is not the percentage but the downtime it buys you.

AvailabilityDowntime/yearDowntime/monthDowntime/week
90% ("one nine")36.5 days72 h16.8 h
99%3.65 days7.2 h1.68 h
99.9% ("three nines")8.76 h43.8 min10.1 min
99.99% ("four nines")52.6 min4.4 min1.01 min
99.999% ("five nines")5.26 min26 s6 s

The key insight: each nine costs roughly 10× more than the last. Going from 99% to 99.9% might mean adding a replica and health checks. Going from 99.99% to 99.999% means running in several regions at once with all of them live (active-active), switching away from a broken one automatically within seconds (failover), no human step anywhere in recovery, and an organisation that can ship changes without taking anything offline. That's a different company, not a different architecture.

#Serial dependencies multiply

This is the most important and least intuitive fact about availability.

If a request must pass through several components in series, and each can independently fail, the availabilities multiply:

   [LB 99.99%] → [App 99.9%] → [Cache 99.9%] → [DB 99.95%]

   0.9999 × 0.999 × 0.999 × 0.9995 = 0.9974
                                   ≈ 99.74%  →  ~23 hours/year

Every component was "highly available." The system is not. Adding a dependency always lowers availability unless it's optional.

Two consequences that make good interview material:

  1. Microservices have an availability tax. A request touching 10 services each at 99.9% yields 0.999¹⁰ = 99.0% — 3.65 days of downtime a year. This is why mature microservice architectures invest so heavily in fallbacks, caching, and circuit breakers (a switch that stops calling a failing service for a while, instead of piling on requests that will time out anyway): they're buying back the availability that splitting things up spent.
  2. Make dependencies optional. If the recommendation service being down means "show popular items instead" rather than "return 500," it's no longer in your serial chain. A hard dependency is one whose failure fails your request; a soft one is one you can carry on without. Converting hard dependencies into soft ones is often the cheapest availability improvement available.

#Redundancy adds nines

Parallel redundancy works the opposite way — you fail only if all replicas fail:

   A_system = 1 − (1 − A_component)^N

   One 99% node:       99%       → 3.65 days/yr down
   Two 99% nodes:      99.99%    → 52 min/yr
   Three 99% nodes:    99.9999%  → 31 s/yr

Redundancy is spectacularly effective on paper. In reality it's limited by three things:

  • Correlated failure. Two nodes in the same rack share a power supply and a switch. Same AZ shares utility power and cooling. Same region shares a control plane — the cloud provider's own management systems that start machines, route traffic and apply config. The math above assumes independence, and independence is exactly what you're paying for when you spread across AZs and regions.
  • The failover mechanism itself. If detecting failure takes 30 s and promoting a replica takes 60 s, you have a 90-second outage no matter how many replicas exist. Failover time frequently dominates the availability calculation.
  • Shared fate through software. A bad deploy, a poisoned cache entry, or a config change hits every replica simultaneously. This is why staged rollouts and canaries (releasing a change to a small slice of servers first and watching for trouble before going wider) matter more than replica count for real-world availability.

#SLA vs SLO vs SLI

These get used interchangeably and shouldn't be:

  • SLI (Indicator) — the actual measurement. "Proportion of HTTP requests returning non-5xx (not a server error) in under 300 ms."
  • SLO (Objective) — your internal target for that indicator. "99.9% over a rolling 28 days." This is what engineering builds toward.
  • SLA (Agreement) — the contract with customers, including penalties. Typically set looser than the SLO, deliberately, so you breach your internal target long before you owe anyone money.

Common structure: SLA 99.9%, SLO 99.95%, and alerting that fires well before either.

#Error budgets

The single most useful reframe in reliability engineering.

If your SLO is 99.9%, you have implicitly authorized 0.1% unreliability — about 43 minutes a month. That's not failure; that's budget.

   Error budget = (1 − SLO) × total requests

   SLO 99.9%, 100M requests/month
   → budget = 100,000 failed requests/month

What this changes:

  • Budget remaining → ship faster. Risky migrations, aggressive experiments, faster rollouts.
  • Budget exhausted → freeze features, and work on reliability until the window resets.

This converts the perennial argument between "move fast" and "keep it stable" into arithmetic. Error budgets are the concrete answer to "how do you balance velocity and reliability?" — instead of debating opinions, you check how much budget is left.

#MTBF, MTTR, and where to spend

   Availability = MTBF / (MTBF + MTTR)

   MTBF = mean time between failures   (how often it breaks)
   MTTR = mean time to recovery        (how long you're down)

Both levers work, but they cost very differently. Halving your failure rate typically means eliminating whole classes of bugs and hardware faults — expensive and slow. Halving recovery time means better detection, faster rollback, and automated failover — usually cheaper and more achievable.

   MTBF 30 days, MTTR 60 min   → 99.86%
   MTBF 30 days, MTTR  5 min   → 99.99%   (same failure rate!)
   MTBF 90 days, MTTR 60 min   → 99.95%

Cutting MTTR from 60 to 5 minutes bought two nines without preventing a single failure. That's why mature organizations obsess over rollback speed, feature flags (switches that turn a feature off without a deploy), and one-click failover: it's the highest-leverage reliability work available.

#Availability vs durability

Frequently conflated; completely different.

  • Availability — can I reach the data right now?
  • Durability — will the data still exist later?

S3-class object storage advertises ~99.999999999% (eleven nines) durability but ~99.99% availability. Translation: the service may be briefly unreachable, but your bytes are not going to be lost. Those are different guarantees achieved by different mechanisms. Durability comes from erasure coding (splitting each file into pieces plus extra parity pieces, so it can be rebuilt even if several pieces are lost) and multi-AZ replication. Availability comes from request routing and capacity.

The interview-relevant version: a system can be unavailable and lose nothing, or available and lose data. Two ways to copy data to a replica show the trade:

  • Async replication — the primary confirms a write before the replica has it. With fast failover you get high availability, but if the primary dies, the last few writes that hadn't reached the replica are lost. That window of loss is your RPO (below).
  • Sync replication — the primary waits for the replica to confirm before saying "done". Nothing confirmed is ever lost, at the cost of slower writes, and of availability when the replica can't be reached.

#RPO and RTO

The two numbers that define your disaster recovery posture, and worth naming explicitly:

  • RPO (Recovery Point Objective) — how much data you can afford to lose, measured in time. RPO = 5 min means async replication with ≤5 min lag, or 5-minute backups.
  • RTO (Recovery Time Objective) — how long recovery may take. RTO = 1 min rules out restoring from backup; you need a hot standby — a copy already running and up to date, ready to take over.
StrategyRPORTORelative cost
Nightly backup24 hhours★
Backup + WAL shippingminutes~1 h★★
Async replica, manual failoverseconds~10 min★★★
Async replica, auto failoverseconds<1 min★★★★
Sync replica (multi-AZ)0seconds★★★★★
Multi-region active-active0~0★★★★★★

WAL shipping means continuously copying the database's change journal (its write-ahead log) to another machine, so you can replay it on top of the last backup and lose only minutes.

Asking "what's the acceptable RPO here?" instead of asserting a replication strategy is a small move that reads very well: it shows you know the answer depends on the business, not the technology.

#What actually causes outages

Worth knowing, because it redirects where you focus in a design discussion. Across published post-mortems, the dominant causes are consistently:

  1. Change — deploys, config pushes, schema migrations, certificate expiry. The large majority of incidents.
  2. Dependency failure — a downstream service degrading and the failure propagating.
  3. Capacity / traffic — organic spikes, retry storms, cascading failure.
  4. Hardware / infrastructure — the one people design for most and which causes the fewest incidents.

The implication is uncomfortable and worth saying out loud: redundancy protects against the rarest cause. Deploy safety, gradual rollouts, and fast rollback protect against the most common one. A design answer that includes "canary deploys with automated rollback on SLO regression" — ship each change to a few servers first, and undo it automatically if the SLO metrics get worse — addresses more real-world downtime than a third replica does.

#Check yourself

Roughly how much downtime a month do 99.9% and 99.99% allow?Show answer
About 44 minutes a month at 99.9%, and about 4.4 minutes at 99.99%. Each extra nine costs roughly ten times more to achieve.
A request passes through components at 99.99%, 99.9%, 99.9% and 99.95%. What's the path's availability?Show answer
They multiply: about 99.74%, roughly 23 hours of downtime a year. Every hard dependency you add lowers availability.
What's often the cheapest way to raise a service's availability?Show answer
Turn hard dependencies into soft ones with fallbacks — if recommendations fail, show popular items instead of an error — so they drop out of the serial chain.
Three independent 99% replicas give six nines on paper. What three things stop that in reality?Show answer
Correlated failures (shared rack, power or region), the time failover itself takes, and shared software fate — a bad deploy or config hits every replica at once.
SLI, SLO, SLA — what's the difference?Show answer
SLI: the measurement (share of requests under 300 ms without an error). SLO: the internal target for it (99.95% over 28 days). SLA: the customer contract with penalties, set looser than the SLO on purpose.
How do error budgets settle the "move fast versus stay stable" argument?Show answer
A 99.9% SLO allows 0.1% failure — about 43 minutes a month. Budget left: ship faster and take risks. Budget spent: freeze features and fix reliability. The argument becomes arithmetic.
With failures every 30 days, how does cutting recovery time from 60 to 5 minutes change availability?Show answer
From about 99.86% to about 99.99% — two nines gained without preventing a single failure. Fast detection and rollback is often the highest-leverage reliability work.
RPO versus RTO, and what does an RTO of one minute rule out?Show answer
RPO: how much data you can lose, measured in time. RTO: how long recovery may take. A one-minute RTO rules out restoring from backups; you need a hot standby with automatic failover.

#What to carry forward

  • Each nine costs about ten times the last; turn "highly available" into a number and a price.
  • Serial dependencies multiply availability down; parallel redundancy raises it only if failures are independent.
  • SLI is the measurement, SLO the target, SLA the contract — and the error budget turns reliability into arithmetic.
  • Cutting recovery time is often cheaper than preventing failures, and change causes most outages, not hardware.
  • Availability (can I reach it now) and durability (will it still exist) are different guarantees; RPO and RTO set the recovery design.
00:00
/ 11m