Availability, SLIs, SLOs and SLAs

How to measure uptime, what 'the nines' mean, error budgets, and how dependencies multiply availability.

What is it?

Availability is the fraction of time (or of requests) a system works correctly for its users. It's usually written as a percentage and nicknamed by its "nines": 99.9% is "three nines".

Three terms come up constantly: - SLI (Service Level Indicator): a measured number, e.g. "the share of HTTP requests that returned a non-5xx response in under 300 ms". - SLO (Service Level Objective): the internal target for that SLI, e.g. "99.9% over a rolling 30 days". - SLA (Service Level Agreement): a contract with customers that promises a level of service and states the penalty (usually service credits) if it's missed. SLAs are set looser than SLOs so you get a warning before you owe money.

The gap between 100% and the SLO is the error budget: the amount of failure you are allowed. Teams spend it on deploys and experiments, and slow down when it runs out.

Explain like I'm 10

A bus company measures how many buses leave on time (SLI), aims internally for 99% (SLO), and promises passengers a refund if fewer than 95% are on time (SLA). The 1% of late buses they're allowed is their error budget: they can spend it on road works, but not much more.

Examples

The nines and allowed downtime

Availability   Downtime per year   per 30-day month
99%            3.65 days           7.2 hours
99.9%          8.76 hours          43.2 minutes
99.95%         4.38 hours          21.6 minutes
99.99%         52.6 minutes        4.32 minutes
99.999%        5.26 minutes        25.9 seconds

Availability in series and in parallel

// Series: every component must be up (a request goes through all of them).
function seriesAvailability(components: number[]) {
  return components.reduce((total, availability) => total * availability, 1);
}

// Parallel: the system is up if at least one replica is up
// (assumes failures are independent).
function parallelAvailability(replicaAvailability: number, replicaCount: number) {
  return 1 - Math.pow(1 - replicaAvailability, replicaCount);
}

seriesAvailability([0.999, 0.999, 0.999]); // 0.997   → about 26 h down/year
parallelAvailability(0.99, 2);             // 0.9999  → two 99% boxes give 99.99%
seriesAvailability([parallelAvailability(0.999, 2), 0.9995]); // ≈ 0.9995

Chaining dependencies multiplies availabilities, so the result is worse than the weakest link. Redundancy multiplies the unavailabilities, so it improves quickly, but only if replicas fail independently.

How it works

Measuring. Availability can be time-based (uptime ÷ total time) or request-based (good requests ÷ valid requests). Request-based is usually better for services because it reflects what users actually saw. An SLI should be measured as close to the user as practical (load balancer logs or synthetic probes, not just "the process is running").

Error budgets. With a 99.9% SLO over 30 days, the budget is 0.1% = 43.2 minutes of full outage, or the equivalent in failed requests (1 in 1,000). If a bad deploy burns half the budget in a day, the team pauses risky launches and invests in reliability until the budget recovers. Alerting on burn rate (how fast the budget is being consumed) catches problems faster than alerting on raw error counts.

Series. If a request needs components A, B and C, all must be up: A_total = A_a × A_b × A_c. Three 99.9% services in a row give 0.999³ ≈ 99.7%. This is why a long chain of synchronous microservice calls erodes availability.

Parallel. If any one of n independent replicas can serve the request: A_total = 1 − (1 − A)^n. Two 99.9% replicas: 1 − 0.001² = 99.9999%. The big caveat is independence: replicas in the same rack, zone, region, or sharing a bad config or deploy can fail together, so real gains are smaller.

Downtime is also MTBF and MTTR. Availability ≈ MTBF ÷ (MTBF + MTTR), where MTBF is mean time between failures and MTTR is mean time to recovery. Reducing MTTR (fast detection, quick rollback, automated failover) is often the cheapest way to add a nine.

Series: all must work
  Client ─▶ [LB 99.99%] ─▶ [App 99.9%] ─▶ [DB 99.95%]
  Total ≈ 0.9999 × 0.999 × 0.9995 ≈ 99.84%

Parallel: any one is enough
              ┌─▶ [App replica 99%] ─┐
  Client ─▶ LB│                      │  1 − (0.01 × 0.01) = 99.99%
              └─▶ [App replica 99%] ─┘

Why does it exist?

"Always up" is impossible and "as reliable as possible" has no end: every extra nine costs much more. SLOs turn reliability into an explicit, measurable target that balances users' needs against the speed of shipping features. SLAs turn that target into a business promise.

When to use it

Define SLIs and SLOs for any service other people depend on. Use the series/parallel math when deciding whether to add a dependency, a replica, or a second zone or region, and when checking whether a promised SLA is even achievable given your dependencies' SLAs.

When not to use it

Don't chase extra nines where users won't notice: a batch report that's down for an hour overnight doesn't need 99.99%. And don't promise an SLA tighter than the product of your critical dependencies' availability; you can't be more available than a dependency you can't work without.

Common mistakes

  • Setting the SLO at 100%. It leaves no error budget, blocks every change, and is impossible anyway.

  • Assuming replicas fail independently when they share a zone, a network, a config system or a deploy pipeline.

  • Measuring availability as 'the server process is running' instead of what users experience (successful, fast-enough responses).

  • Forgetting that each synchronous dependency in the request path multiplies down availability.

  • Making the SLA equal to the SLO, so there's no warning margin before contractual penalties.

Practice exercises

  1. Easy:

    How many minutes of downtime per 30-day month does a 99.95% SLO allow?

  2. Medium:

    A request goes through a load balancer (99.99%), an API service (99.9%), and a database (99.95%). What's the overall availability? What single change would improve it the most?

  3. Hard:

    Your product must offer a 99.99% SLA, but it depends on a payment provider with a 99.9% SLA. Propose a design that still meets the SLA for the parts of the product that matter, and explain what you'd exclude or degrade.

Interview questions

What's the difference between an SLI, an SLO and an SLA?

An SLI is a measurement (e.g. % of successful requests). An SLO is the internal target for it (99.9% over 30 days). An SLA is a contract with customers with penalties if a level, usually looser than the SLO, is missed.

How much downtime per year does 99.9% allow? 99.99%?

99.9% allows about 8.76 hours per year (~43 minutes a month). 99.99% allows about 52.6 minutes per year (~4.3 minutes a month).

What is an error budget?

The allowed unreliability: 100% minus the SLO. With 99.9%, 0.1% of requests can fail. Teams spend it on releases and experiments, and freeze risky changes when it's exhausted.

Three services each at 99.9% are called in sequence. What's the combined availability?

0.999³ ≈ 99.7%, which is about 26 hours of downtime per year: worse than any single component.

Two independent replicas each at 99% availability sit behind a load balancer. What's the availability of the pair?

1 − (0.01)² = 99.99%, ignoring the load balancer itself. Redundancy multiplies the failure probabilities together.

Why don't real systems get the full benefit of the parallel formula?

It assumes independent failures. Replicas often share failure modes: the same zone, network, dependency, configuration or bad deploy. That's why you spread replicas across zones and roll out changes gradually.

Is request-based or time-based availability better?

Request-based (good requests ÷ total) usually reflects user experience better: a 5-minute outage at peak hurts more than one at 3 a.m., and partial failures (5% of requests erroring) show up properly.

How do MTBF and MTTR relate to availability, and which is usually easier to improve?

Availability ≈ MTBF ÷ (MTBF + MTTR). Cutting MTTR through fast detection, automated failover and quick rollbacks is often cheaper than making failures rarer.

Why is alerting on error budget burn rate better than alerting on error rate thresholds?

Burn rate ties alerts to user-impacting SLO risk: a fast burn (e.g. 14× normal over an hour) pages immediately, a slow burn opens a ticket. It cuts noisy alerts for brief blips while still catching slow, steady degradation.

Your service has a hard dependency at 99.9%, but you need 99.99%. What can you do?

Remove it from the critical path: cache its responses, make the call asynchronous via a queue, degrade gracefully when it's down, add a fallback provider in parallel, or exclude that feature from the SLA scope.