Sub topic 12
Availability targets and allowed downtime
This chapter turns an availability percentage such as "99.9%" into minutes of allowed downtime. It also shows how the availability of several components combines into the availability of the whole system. It assumes you know the time conversions from the earlier chapter (minutes per day and per year), basic percentages, and what a load balancer and a replicated database do. The code is optional Python.
Why availability belongs in an estimate
Traffic, storage and bandwidth tell you how big the system is. Availability tells you how much failure the system may have. A target of 99.99% costs much more than 99.9%, because it forces redundancy, automated failover and careful deploys. Converting the percentage into minutes lets you ask whether the design can meet it and whether the cost is justified.
Availability is the fraction of time a service works correctly for its users. Downtime is the rest of that time. The two add up to 100% of the measurement window.
From percentage to minutes
The formula is:
allowed downtime = (1 - availability) * windowUse the year as the default window, since it is what you usually quote. A non-leap year has 365 × 24 × 60 = 525,600 minutes. Rounded, that is about 525,000 minutes, or roughly 8,760 hours.
minutes_per_year = 365 * 24 * 60
for availability in (99.9, 99.99):
downtime = (1 - availability / 100) * minutes_per_year
print(availability, round(downtime, 2))
# 99.9 525.6
# 99.99 52.56Each extra nine cuts the allowed downtime by a factor of ten. This follows from the formula, because the unavailable fraction goes from 0.1% to 0.01%.
Reference table
| Availability | Common name | Per year | Per 30-day month | Per week |
|---|---|---|---|---|
| 99% | two nines | 5,256 min (about 87.6 hours) | 432 min (7.2 hours) | 100.8 min |
| 99.9% | three nines | 525.6 min (about 8.8 hours) | 43.2 min | 10.1 min |
| 99.99% | four nines | 52.56 min | 4.32 min | 1.01 min |
| 99.999% | five nines | 5.26 min | 26 s | 6 s |
| 99.9999% | six nines | 31.5 s | 2.6 s | 0.6 s |
You don't need to memorize every cell. Remember three anchors:
- 99.9% is about 9 hours a year, or about 43 minutes a month.
- 99.99% is about 53 minutes a year, or about 4 minutes a month.
- 99.999% is about 5 minutes a year.
Everything else follows by factors of ten.
What the numbers imply
The numbers tell you what kind of operations the target requires.
- At 99.9%, a human can be paged, log in, diagnose and fix an incident inside the monthly budget, if it happens rarely.
- At 99.99%, one 10-minute incident uses more than two months of budget. Recovery must be mostly automatic: health checks, failover, and rollback of bad deploys.
- At 99.999%, even a slow failover is a violation. Few teams reach this for a whole product. They usually reach it only for narrow components, such as DNS or a control plane.
Combining components
A user request usually touches several components. The availability of the whole depends on how they are connected.
Components in series
If a request needs every component, all of them must be up. For independent components, multiply their availabilities:
A_total = A1 * A2 * ... * AnThree components at 99.9% each give 0.999³ ≈ 0.997, or 99.7%. That is about 1,575 minutes (26 hours) of downtime a year. The chain is always less available than its weakest part, and every added dependency lowers the total.
Components in parallel
If redundant copies each can serve the request, the system fails only when all copies fail. For n independent copies:
A_total = 1 - (1 - A)^nTwo copies at 99.9% each give 1 − 0.001² = 0.999999, or 99.9999%. That is about half a minute of downtime a year.
minutes_per_year = 365 * 24 * 60
def serial(*availabilities):
"""All components must work (availabilities as fractions)."""
total = 1.0
for a in availabilities:
total *= a
return total
def parallel(availability, copies):
"""Service works if at least one independent copy works."""
return 1 - (1 - availability) ** copies
def downtime_minutes(availability):
return (1 - availability) * minutes_per_year
chain = serial(0.999, 0.999, 0.999)
pair = parallel(0.999, 2)
print(round(chain, 6), round(downtime_minutes(chain), 1))
# 0.997003 1575.2
print(round(pair, 6), round(downtime_minutes(pair), 2))
# 0.999999 0.53A typical stack
Consider a request path of load balancer, two app servers, and a database with a standby. Redundancy applies at some layers and not at others.
To estimate it, treat the two app servers as one parallel group, then multiply that group by the layers in series with it. The load balancer is a single point of failure unless you also run it redundantly. Whatever you leave unreplicated caps the total, because the multiplication cannot raise the result above its weakest layer.
Error budgets
An error budget is the downtime your target allows in a window. A 99.9% monthly target gives 43.2 minutes. Teams use the budget to make decisions:
- If the budget is mostly unspent, you can ship riskier changes more often.
- If it is spent, you slow releases and invest in reliability.
This turns "be reliable" into a number that both engineers and product owners can check.
Gotchas
Independence is an assumption
The parallel formula assumes copies fail independently. Real copies often share causes of failure:
- the same bad deploy or configuration change
- the same data center, power feed or network switch
- the same dependency, such as one DNS provider or one database
Two servers in one rack are far from independent. Treat the parallel result as a ceiling and say so when you state it. Spreading copies across zones or regions makes the assumption more believable, at the cost of latency and complexity.
Define what counts as down
"Up" must be measured at a point, with a rule. Does a response that returns 500 on 2% of requests count as downtime? Does a slow page that loads in 30 seconds? Many teams measure availability as the fraction of successful requests, not as time. That changes the math, because a partial outage uses only part of the budget.
Agree on the window and exclusions
99.9% per year and 99.9% per month allow the same total, but the monthly version forbids one long outage. A single 4-hour incident passes a yearly 99.9% target (8.8 hours) and breaks a monthly one (43 minutes). Also state whether planned maintenance is excluded. Contracts often exclude it, while users still feel it.
Dependencies set your ceiling
If your service depends on a third-party API with a 99.9% commitment and you call it on every request, you cannot promise more than 99.9% unless you add a fallback, a cache, or an asynchronous path.
Don't over-promise
A target should be justified by user impact and cost, not chosen because it sounds good. Moving from three to four nines may mean multi-zone deployment, automated failover and a larger on-call investment. If users would not notice the difference, the added cost is not worth it.
Using it in an estimate
When an interviewer or a requirements document gives an availability number, do this:
- Convert it to downtime per year and per month, using the anchors above.
- List the components on the critical request path and note which are replicated.
- Multiply the layers in series, and use the parallel formula for replicated groups.
- Compare the result with the target and name the weakest layer.
- State the assumptions: independent failures, the window, and what counts as down.
Four steps of rough arithmetic are enough. You are checking whether the design is in the right range, not producing a contractual figure.
Exercise
A checkout service has a 99.95% monthly availability target (30-day month). (a) How many minutes of downtime per month does it allow? (b) The request path goes through a load balancer (99.99%), an app tier of two independent servers (99.9% each), and a database (99.95%). Ignoring all other components, does the path meet the target?
Show answer
(a) A 30-day month has 30 × 24 × 60 = 43,200 minutes. The allowed downtime is 0.0005 × 43,200 = 21.6 minutes. (b) The app tier in parallel is 1 − 0.001² = 0.999999. In series with the others: 0.9999 × 0.999999 × 0.9995 ≈ 0.99940. That is about 99.94%, which is below 99.95%, so the path just misses the target. Its unavailability is about 0.0006, or roughly 26 minutes a month. The database (99.95%) is the weakest layer, so replicating it or adding a standby would be the first improvement. This assumes independent failures and a failover that works instantly.