Sub topic 13
The cost of each extra nine
This chapter assumes you know how to convert nines into a downtime budget. It also assumes you can combine availabilities in series and in parallel, and that you know what an SLO and an error budget are. It uses those tools to answer a decision question: when is the next nine worth building?
Each nine is ten times smaller and costs more
Each added nine cuts the allowed downtime by a factor of ten. The yearly numbers show how fast the margin shrinks.
| Target | Downtime per year | Downtime per 30 days |
|---|---|---|
| 99% | about 3.65 days | 432 minutes |
| 99.9% | about 8.8 hours | 43.2 minutes |
| 99.99% | about 52.6 minutes | 4.32 minutes |
| 99.999% | about 5.3 minutes | 26 seconds |
The cost of reaching each row does not shrink the same way. It usually grows, for three reasons.
- Detection and response must be faster. A 43-minute monthly budget leaves time for a person to be paged, open a laptop, and investigate. A 4-minute budget does not. At 99.99% most recoveries must be automatic, such as health checks, failover, and automatic rollback.
- More failure causes have to be removed. At 99% most downtime comes from ordinary events like bad deploys and crashed processes. At 99.99% those are handled, and the remaining budget is spent on rarer events like a zone outage, a corrupt configuration push, or an expired certificate.
- Operating the system gets harder. Redundancy across zones or regions adds data replication, failover testing, and capacity headroom. It also adds on-call rotations and more complex deploys.
The benefit side moves the opposite way. Going from 99% to 99.9% saves about 3.3 days of downtime a year. Going from 99.99% to 99.999% saves about 47 minutes. The cost per saved minute rises steeply with each nine.
What each tier typically requires
The table below describes common engineering practice. The tiers are a guide, and the exact boundaries vary by system.
| Target | Typical design | Main new costs |
|---|---|---|
| 99% | Single instance, backups, manual recovery | Low. A monitoring alert and a runbook. |
| 99.9% | Several instances behind a load balancer, health checks, automated deploys | Spare capacity, a deploy pipeline, an on-call rotation. |
| 99.99% | Multiple zones, automated failover, canary releases, automatic rollback | Cross-zone data replication, failover testing, more engineers on call. |
| 99.999% | Multiple regions, active-active data, no manual steps in recovery | Conflict handling in the data layer, cross-region traffic cost, a dedicated reliability team. |
Capacity is a hidden cost in this table. If two zones must survive losing one, each zone must carry the full load alone. That means about 100% spare capacity. With three zones, each can run at roughly 67% utilization and still survive losing one, so the spare capacity drops to about 50%. More zones reduce the spare-capacity ratio but add coordination work.
Putting the trade-off into numbers
You can compare the cost of a nine with the value of the downtime it removes. The function below estimates yearly downtime cost and the savings from each step up. The $200 per minute figure is an assumption, so substitute your own estimate.
def yearly_downtime_minutes(availability):
return (1 - availability) * 365 * 24 * 60
def downtime_cost(availability, cost_per_minute):
return yearly_downtime_minutes(availability) * cost_per_minute
tiers = [0.99, 0.999, 0.9999, 0.99999]
cost_per_minute = 200 # assumed revenue and recovery cost of one minute down
for lower, higher in zip(tiers, tiers[1:]):
saved = downtime_cost(lower, cost_per_minute) - downtime_cost(higher, cost_per_minute)
print(f"{lower:.3%} -> {higher:.3%}: saves ${saved:,.0f} per year")
# 99.000% -> 99.900%: saves $946,080 per year
# 99.900% -> 99.990%: saves $94,608 per year
# 99.990% -> 99.999%: saves $9,461 per yearEach step saves a tenth of the one before. If the move to 99.99% costs $300,000 a year in engineering and infrastructure, it loses money at this price per minute. The savings are $94,608. The same step would pay for itself at a system losing $2,000 a minute.
This model is a simplification. Downtime cost is rarely linear. A five-minute outage during a sale can cost more than an hour at 3 a.m. Long outages also do disproportionate damage to trust and contracts. Use the formula to find the order of magnitude, then adjust for when the failures are likely to land.
The ceiling set by the rest of the path
A user's experience depends on more than your service. Their request passes through a device, a network, DNS, and your dependencies. These are components in series, so the chain is only as good as the product of its parts.
from math import prod
def series(*availabilities):
return prod(availabilities)
# Assumed values: user network, DNS, your service
print(series(0.999, 0.9999, 0.99999)) # about 0.99889The result is about 99.89%. Raising your own service from 99.99% to 99.999% changes that figure from about 99.889% to about 99.890%. Users cannot see the difference.
Dependencies set the same ceiling inside your own system. If your service calls a third-party provider that offers 99.9%, and every request needs it, your service cannot exceed 99.9% unless you remove that hard dependency. A fallback, a cache, or a queue can remove it. The purchase of another nine has to begin with the dependencies, not with your own servers.
Where the money goes: a decision flow
Before approving the next nine, work through the questions below in order.
The last question is easy to skip. Failover that is never exercised tends not to work when needed. A multi-region design that the team cannot operate often lowers availability, because the added complexity creates new ways to fail.
Using the error budget to spend sensibly
An SLO is a choice about how much unreliability you will accept. The error budget turns that choice into something you spend on features, experiments, and risky deploys. A tighter SLO shrinks the budget and forces slower, more careful change.
This gives a second way to look at cost. A 99.99% target leaves about 4.3 minutes a month. One slow deploy or one bad configuration push can use all of it. Teams at that level usually need staged rollouts, automatic rollback, and strict change review. All of these slow down feature work. The cost of a nine is therefore partly paid in delivery speed, not only in infrastructure.
You can track the remaining budget with the request-based function from the earlier chapter.
def error_budget_remaining(slo, total_requests, failed_requests):
allowed_failures = (1 - slo) * total_requests
return allowed_failures - failed_requests
# Month with 10 million requests and 4,000 failures
print(error_budget_remaining(0.999, 10_000_000, 4_000)) # about 6000 failures left
print(error_budget_remaining(0.9999, 10_000_000, 4_000)) # about -3000 failures leftThe same traffic and the same 4,000 failures fit comfortably in a 99.9% budget. Against a 99.99% target they leave the service about 3,000 failures over budget. That means the team stops risky releases until reliability recovers. If your real failure rate is already near 4,000 per 10 million requests, moving to 99.99% means a large engineering investment, not a relabeled number.
Cheaper ways to improve than adding a nine
Several measures raise user-visible availability without paying for the full redundancy of the next tier.
- Cut repair time. Availability is MTBF divided by MTBF plus MTTR. Shrinking MTTR from one hour to six minutes gains about one nine and does not require a second region. Better alerts, one-step rollbacks, and rehearsed runbooks are cheap compared with a new data center.
- Degrade gracefully. If recommendations are down but checkout works, count that as a partial outage and not a full one. Serving a cached or reduced response keeps most requests succeeding.
- Protect the critical path. Give a higher target to login and payments than to the settings page. Not every endpoint needs the same SLO.
- Retry and time out sensibly. Client retries with backoff hide short failures from users, at little cost. Unbounded retries can instead cause an overload that turns a small failure into a long one.
- Schedule maintenance honestly. If your SLO excludes planned windows, say so in writing. If it does not, plan changes as rolling updates so that no window is needed.
Common mistakes
- Targeting five nines by default. Teams choose a number that sounds good and then discover the cost. Start from user needs and the cost of downtime.
- Paying for redundancy that fails together. Two servers in the same rack, zone, or release pipeline share failures. Their combined availability is far below the independent-failure calculation.
- Ignoring the human side. An on-call team that is exhausted by paging produces slower, more error-prone recoveries. This raises MTTR and can cancel the gains from the added redundancy.
- Measuring too coarsely. A time-based metric that counts a minute as up if any request succeeds will hide partial outages. Request-based measurement shows the real user impact and is usually the better basis for a costly target.
Exercise
A service handles revenue of about $50 per minute of uptime. It currently meets 99.9%. An engineering proposal would reach 99.99% for $80,000 per year. Using a 365-day year, does the proposal pay for itself based on avoided downtime alone? What else would you check before deciding?
Show answer
Downtime at 99.9% is 0.001 × 525,600 = 525.6 minutes a year. At 99.99% it is 52.56 minutes. The saving is 473.04 minutes, worth about 473.04 × $50 = $23,652 a year. That is well below $80,000, so the proposal does not pay for itself on lost revenue alone. Before deciding, check whether contracts or major customers require 99.99%, whether outages cost more than $50 per minute through refunds or lost trust, whether hard dependencies already cap the system below 99.99%, and whether cheaper options such as faster recovery would close part of the gap.
Exercise
Your service is 99.99% available, but it depends on a payment provider at 99.9% on every request. What is the best availability you can expect, and what are two ways to improve it?
Show answer
The two are in series, so the best case is about 0.9999 × 0.999 = 0.9989, or roughly 99.89%. To improve it, remove the hard dependency from the request path. For example, queue payment requests and process them later, or add a second payment provider so the two work in parallel. A second provider helps only if the failures are independent.