Part 2 · System Design Core Concepts
Availability and "The Nines" Explained
“Five nines” is 26 seconds of downtime a month. What the nines really mean, why chained dependencies multiply away your availability while redundancy multiplies it back, and why fast recovery is often the cheapest nine you can buy.
On this page
The Problem
Your manager says: "Our payment service must have five nines of availability." Everyone nods. But what does that really mean?
- How many minutes of downtime is that per year?
- Is it even possible when you depend on a database, a cloud provider and a bank's API, and each one has its own downtime?
- How many extra servers will it cost?
"The nines" are the common language for availability. Availability is how much of the time a system works when users need it. "Nines" are the number of 9 digits in the percentage, such as 99.9% (three nines). Understanding them helps you set realistic goals, and see how much each extra nine really costs.
The Core Idea
Think of your local ATM.
- If it works 99% of the time, it is broken for about 3.65 days a year. That is annoying, but you can walk to the next one.
- If it works 99.99% of the time, it is down less than an hour a year. You would probably never notice.
Availability is the percentage of time (or the percentage of requests) in which the system works as expected. Downtime is the time when it does not.
Each extra "9" means 10× less downtime, and usually a lot more cost and effort. Going from 99% to 99.9% might mean adding a second server. Going from 99.99% to 99.999% might mean running in several regions (separate geographic areas with their own data centres), with automated failover (switching to a backup by itself) and a team on call 24 hours a day (people who are ready to fix problems at any time).
How It Works
Availability, reliability and durability
These three words are often mixed up. Here is what each one means:
- Availability: can I use it right now? (Is the site up?)
- Reliability: does it work correctly, over time? (Does it give the right answers, even when parts fail?)
- Durability: is my data safe? (Will my saved file still exist next year?) Data that stays saved and is not lost is called durable.
A system can be available but not reliable: it is up, but it shows wrong prices. It can also be durable but not available: your photos are safe in storage, but the app is down so you cannot see them.
The nines table
| Availability | Downtime per year | Downtime per month | Downtime per week |
|---|---|---|---|
| 99% ("two nines") | ~3.65 days | ~7.3 hours | ~1.7 hours |
| 99.9% ("three nines") | ~8.77 hours | ~43.8 minutes | ~10 minutes |
| 99.95% | ~4.38 hours | ~21.9 minutes | ~5 minutes |
| 99.99% ("four nines") | ~52.6 minutes | ~4.4 minutes | ~1 minute |
| 99.999% ("five nines") | ~5.26 minutes | ~26 seconds | ~6 seconds |
Look at five nines: 26 seconds a month. This is often less time than a person needs to notice an alert, open a laptop and log in. At that level, recovery must be automatic.
Red bar = allowed downtime, drawn 10× larger than life. Each extra nine cuts it by ten — and usually costs far more than ten times as much to achieve.
Two ways to measure it
Time-based availability asks what fraction of time the system was up:
Availability = uptime / (uptime + downtime)Request-based availability asks what fraction of requests succeeded:
Availability = successful requests / total requestsRequest-based is usually more useful for web services:
- If your site is "up" but 10% of checkout requests fail, the time-based number says 100%, but users would not agree.
- An outage at 3 AM, when few people use the site, hurts fewer users than an outage at 8 PM.
MTBF and MTTR
Two numbers describe how often things break and how fast you fix them. "Mean" means average:
- MTBF (Mean Time Between Failures): the average time between one failure and the next.
- MTTR (Mean Time To Recovery): the average time it takes to recover after a failure.
Availability = MTBF / (MTBF + MTTR)Example: your service fails about once a month (MTBF ≈ 720 hours).
- If recovery takes 4 hours: 720 / 724 ≈ 99.45%.
- If recovery takes 15 minutes: 720 / 720.25 ≈ 99.97%.
The failure rate did not change, but availability improved a lot. You can reduce recovery time with good monitoring (watching the system and raising alerts), quick rollbacks (going back to the previous working version) and automatic failover. This is often easier and cheaper than preventing every failure.
Composite availability: series
Your system is a chain of components. If a request needs all of them to work (this is called "in series"), their availabilities multiply:
- User
- Load balancer99.99%
- App server99.9%
- Database99.9%
- Total≈ 99.8% — lower than the weakest part
The whole is less available than its weakest part. Every extra dependency (something your system needs in order to work) in the request path lowers the total availability. Three services each at 99.9% in a chain give about 99.7%. That is about 26 hours of downtime a year, instead of about 9.
This is why:
- You cannot promise 99.99% if your system depends on a third-party API (a service run by another company) that offers only 99.9%, unless you have a fallback (a backup plan, such as a saved answer).
- Fewer hard dependencies in the critical path (the steps every request must pass) means better availability.
Composite availability: parallel (redundancy)
Redundancy means keeping extra copies of a component. If you have two copies and only need one to work (this is called "in parallel"), availability goes up:
Total = 1 − (chance both fail at the same time) = 1 − (1 − A) × (1 − B)Example: two servers, each 99% available:
Two "two nines" servers together give "four nines". This is the power of redundancy.
The big catch: this maths assumes the two copies fail independently (one failing does not make the other more likely to fail). In real life, failures are often correlated, which means they happen together:
- both servers are in the same data centre (a building full of servers), which loses power,
- both run the same release of the code, and it has a bug,
- both depend on the same database or DNS provider,
- the same bad configuration change is pushed to both.
This is why real systems spread copies across availability zones (separate data centres in one city area) and regions (separate geographic areas), and roll out changes slowly, a few servers at a time. More on this in Part 7.
Planned vs unplanned downtime
- Unplanned downtime: crashes, bugs, hardware failures, outages.
- Planned downtime: maintenance windows, which are set times for upgrades or migrations (moving data or systems).
Some services exclude planned maintenance from their availability numbers, and many banks announce "scheduled maintenance" at night. Modern systems aim for zero planned downtime. They use rolling deploys (updating servers one at a time) and online migrations (changes made while the system keeps running), so maintenance does not affect users.
SLAs: promises with consequences
An SLA (Service Level Agreement) is a written promise to customers, usually with money attached. For example: "If monthly availability drops below 99.9%, you get a 10% credit." Internal targets (called SLOs, Service Level Objectives, covered in Part 8) are usually stricter than the SLA, so you notice problems before you break your promise. Difference in one line: an SLA is the promise to customers, an SLO is your own goal.
How much availability do you need?
More nines are not always better. Each nine costs more:
| Target | What it usually takes |
|---|---|
| 99% | One server, basic monitoring, manual fixes |
| 99.9% | Redundant servers, load balancer, database replica, alerts |
| 99.99% | Multiple availability zones, automated failover, careful deploys, on-call team |
| 99.999% | Multiple regions, active-active design (all regions serve users at the same time), a lot of automation, a lot of testing |
Also ask: what do users actually notice? If a user's own Wi-Fi or mobile network is only about 99% reliable, spending millions to go from 99.99% to 99.999% may not change their experience much. Pick the target based on what downtime costs the business, not on "more is better".
The parallel maths only holds if failures are independent. Copies in the same data centre, running the same release, reading the same configuration or depending on the same DNS provider tend to fail together. Spread copies across availability zones and regions, and roll changes out slowly.
Trade-offs
- Higher availability costs more: more servers, more regions, more engineering time and more complex systems.
- More redundancy adds complexity, and complexity can cause outages. Examples are a failover system that switches by mistake, or "split-brain" (two copies both think they are the leader and make different changes).
- Chasing availability can slow down product work. Very strict change processes reduce risk but also reduce speed. Part 8 covers "error budgets" (the amount of failure you may allow), which help to balance this.
- Not every part needs the same target. Payments and login might need 99.99%, while an admin dashboard or recommendations can be 99.5%.
In the Real World
The AWS S3 outage (February 2017). S3 is Amazon's file storage service. An engineer who was fixing a billing problem ran a command with a typo. It removed many more servers than intended in S3's busiest region (us-east-1). S3 in that region was unavailable for several hours. Thousands of websites and apps that depended on it broke, including AWS's own status dashboard. It is a strong lesson in series dependencies (so many services depended on one region) and in MTTR (restarting large systems safely takes time).
The CrowdStrike incident (July 2024). A faulty update to CrowdStrike's security software made millions of Windows computers crash at the same time. Airlines, hospitals, banks and TV stations were hit worldwide. Companies had many machines, but they all ran the same software and got the same update, so the "redundant" machines all failed together. It is the clearest example of correlated failure.
Cloud SLAs. Major cloud providers publish SLAs for their services, commonly in the 99.9%–99.99% range, and give service credits (money back) if they miss them. For example, a single virtual machine usually gets a lower promise than a group of machines spread across several availability zones. The cloud providers themselves are telling you that redundancy across zones is how you earn more nines.
UPI and banking apps in India. UPI is India's instant payment system. People use payments around the clock, and a failure at the moment of paying at a shop is very visible. Payment systems invest heavily in redundancy and fast recovery, and banks announce planned maintenance windows ahead of time so that users are not surprised.
Interview Questions
Q1How much downtime per year does 99.99% allow?
About 52.6 minutes a year, or roughly 4.4 minutes a month. Numbers that are easy to remember: 99.9% ≈ 8.8 hours a year, 99.99% ≈ 53 minutes, 99.999% ≈ 5 minutes.
Q2Your service calls three dependencies, each 99.9% available. What is your best case?
In series the availabilities multiply: 0.999³ ≈ 99.7%, about 26 hours of downtime a year. To do better, remove dependencies from the critical path, add fallbacks or caches, or make those calls asynchronous (the request does not wait for them).
Q3How can you improve availability without making failures rarer?
Cut MTTR. Availability = MTBF / (MTBF + MTTR). If you find problems quickly (good alerts), roll back fast and fail over automatically, a service that fails once a month can move from 99.45% to 99.97% without preventing a single failure.
Q4Availability vs durability?
Availability is whether you can use the system right now. Durability is whether your data survives over time. S3 can be unavailable for a short time while every object stays safe. A system can also be up but have lost data.
Q5Why measure availability by requests rather than time?
Because users experience requests. A site that is “up” while 10% of checkouts fail is not 100% available, and an outage at peak hour hurts far more users than one at 3 AM. Successful requests divided by total requests shows both.
Key Takeaways
- Availability is the percentage of time (or of requests) a system works. Each extra nine means 10× less downtime and much more cost.
- Know the rough numbers: 99.9% ≈ 8.8 hours a year, 99.99% ≈ 53 minutes a year, 99.999% ≈ 5 minutes a year.
- Components in series multiply, so more dependencies mean lower availability. Redundant components in parallel raise availability, if they fail independently.
- Faster recovery (low MTTR) is often the cheapest way to improve availability.
- Choose targets based on business impact, and give different parts of the system different targets.
Further Reading
- Site Reliability Engineering by Google (chapter 3, "Embracing Risk", and the availability table in the appendix)
- The System Design Primer on GitHub (section "Availability in numbers")
- AWS Well-Architected Framework (the Reliability pillar)
- AWS's public summary of the February 2017 S3 service disruption
Published by Jainik · Last updated · How these lessons are made
Keep learning
Part of the study guide
Related series