Free preview

Availability: Nines, SLAs, and Error Budgets

Why this matters: "highly available" is the most-used and least-defended phrase in system design interviews. Knowing what a nine costs — in architecture, in money, in on-call pain — is what turns it into an engineering decision.

Key takeaway

Availability is the percentage of time a service or infrastructure is accessible and functional under normal conditions. Each additional nine cuts your allowed downtime by 10x and typically multiplies your cost and complexity. The engineering question is never "can we be more available?" — it is "is the next nine worth what it costs?"

Measuring availability

The basic definition is a ratio of time:

Availability = Uptime / (Uptime + Downtime)

Expressed against MTBF and MTTR — the reliability metrics from the next lesson — the same quantity is:

Availability = MTBF / (MTBF + MTTR)

That second form is the more useful one, because it shows the two independent levers. You can raise availability by failing less often (higher MTBF) or by recovering faster (lower MTTR). Most teams over-invest in the first and under-invest in the second, even though cutting recovery time is usually far cheaper than preventing every failure.

The nines

Industry states availability in "nines." What each one actually permits:

AvailabilityDowntime per yearDowntime per monthWhat it implies
90% (one nine)36.5 days73 hoursHobby project
99% (two nines)3.65 days7.3 hoursInternal tools
99.9% (three nines)8.77 hours43.8 minutesTypical SaaS; humans can be paged and still make it
99.99% (four nines)52.6 minutes4.4 minutesRecovery must be automated — no time to wake anyone
99.999% (five nines)5.26 minutes26 secondsRedundancy everywhere; failover in seconds, unattended
99.9999% (six nines)31.5 seconds2.6 secondsTelecom / safety-critical; extraordinary cost

Five nines — under six minutes of downtime a year — is the commonly cited gold standard and is genuinely hard to achieve.

Time-based is not the only definition

The formula above measures wall-clock uptime, but users don't experience wall clocks — they experience requests. Large services increasingly measure availability as a success rate:

Availability = Successful requests / Total requests

This is strictly better for two reasons. It captures partial failures — the gray-failure and omission cases from Chapter 1, where a node is "up" while dropping 30% of traffic — and it weights outages by how many users were actually affected. A ten-minute outage at 3 a.m. and one at peak hour are identical on a wall clock and wildly different to your customers.

How availability composes

This is the part candidates most often get wrong, and it has the biggest architectural consequences.

Dependencies in series multiply

If your request must traverse several components, and any one failing fails the request, availability multiplies:

A_total = A_1 * A_2 * ... * A_n

That chain gives 0.9999 * 0.999 * 0.999, about 99.79% — roughly 18 hours of downtime a year, worse than any individual component. Every synchronous dependency you add subtracts from your own availability, which is the availability math behind Chapter 1's warning about temporal coupling.

Redundant components in parallel

If a component is replicated and any one copy can serve the request, the failures must coincide, so unavailability multiplies instead:

A_total = 1 - (1 - A_single)^n
SetupPer-component availabilityCombinedDowntime per year
1 instance99%99%3.65 days
2 instances99%99.99%52.6 minutes
3 instances99%99.9999%31.5 seconds

Two mediocre replicas beat one excellent server. This is the entire mathematical case for redundancy, and it is why horizontal redundancy is almost always cheaper than buying reliability in a single box.

Availability and service providers

Cloud and SaaS providers publish availability commitments, and the vocabulary is precise:

TermWhat it isWho it's forConsequence of breach
SLI (indicator)The measured number — e.g. request success rateEngineersNone — it's a measurement
SLO (objective)Your internal target — e.g. 99.95%Your teamEngineering priority shifts to reliability
SLA (agreement)The contractual promise to customers, always looser than the SLOCustomers, legalService credits, refunds, contractual penalty

Providers state these concretely: EC2 virtual machines carry a 99.95% uptime commitment, and storage services publish their own separate numbers. Note that a provider's SLA typically pays out in service credits — the refund is a fraction of your bill, not compensation for your lost revenue. Their SLA is a pricing mechanism, not an insurance policy.

Error budgets

The most useful idea in this lesson. If your SLO is 99.9%, you are permitted 0.1% unavailability — and that permission is a budget you get to spend:

Error budget = 1 - SLO
99.9% SLO  ->  0.1%  ->  ~43 minutes of downtime per month

This reframes reliability from a moral question into an engineering one:

  • Budget remaining? Ship faster. Take risks. Run experiments and deploy on Fridays. Unspent budget is wasted opportunity — an SLO you never miss means you over-invested in reliability and under-invested in features.
  • Budget exhausted? Feature work stops. Everything goes to reliability until the budget recovers.

Key takeaway

Error budgets end the permanent argument between product and infrastructure by making it arithmetic. "100% availability" is not a goal — it is an infinitely expensive one, and pursuing it means shipping nothing. The goal is to be exactly as available as the business needs, and to spend the difference.

Choosing a target

If an outage causes...Reasonable targetWhat it demands
Mild internal annoyance99%Single instance, restore from backup
Users notice and complain99.9%Redundancy, monitoring, on-call rotation
Direct revenue loss99.99%Multi-AZ, automated failover, no manual steps
Regulatory or safety impact99.999%+Multi-region, redundant everything, formal change control

Interview signal by level

LevelWhat a strong answer sounds like
L4"We need high availability, so we'll add replicas and a load balancer."
L5Quantifies: "99.99% is about 52 minutes a year, so recovery has to be automated — multi-AZ with health-checked failover."
Staff+Composes and budgets: "Four synchronous dependencies multiply to 99.6%, so I'd make two of them async to protect the SLO. Redundancy only helps if failures are independent, so replicas span AZs and deploys are staggered. And I'd run this on an error budget rather than chasing 100%."

Next: the metric availability is built from — and the one people confuse it with.

Enjoying the preview?

Create a free account to unlock the rest of this course, the in-browser judge, and live AI mock interviews.

Sign up free to continue