Resilience Basics: Availability, SLOs and How Systems Fail
Put numbers on reliability: availability percentages and what they mean in minutes, series and parallel components, MTBF and MTTR, service level objectives and error budgets, single points of failure and the usual ways real systems fail.
1. Reliability is a number, not a feeling
“The system is reliable” means nothing until you can say how reliable, measured how, and over what period. Without a target, every outage is an emergency and every improvement is a guess. This lesson gives you the vocabulary and the arithmetic used by monitoring, backup and disaster-recovery work for the rest of the course.
| Term | Meaning |
|---|---|
| Availability | The share of time a service works as users expect |
| SLI (service level indicator) | A measurement of behaviour: the fraction of successful requests, the 95th-percentile latency |
| SLO (service level objective) | An internal target for an SLI: “99.9 percent of requests succeed over 30 days” |
| SLA (service level agreement) | A contract with consequences (credits, penalties) if a promise is missed. Usually looser than the SLO |
| Error budget | What the SLO allows to go wrong: 100 percent minus the SLO |
| MTBF | Mean time between failures: how long a component usually works before failing |
| MTTR | Mean time to repair or recover: how long it takes to restore service |
| RPO / RTO | Maximum acceptable data loss and downtime (next lesson) |
2. What the nines mean
Availability is usually quoted in “nines”. Convert to minutes so everyone understands the promise:
| Availability | Downtime per 30-day month | Downtime per year |
|---|---|---|
| 99 percent | 432 min (7.2 hours) | about 3.65 days |
| 99.5 percent | 216 min (3.6 hours) | about 1.8 days |
| 99.9 percent (“three nines”) | 43.2 min | about 8.76 hours |
| 99.95 percent | 21.6 min | about 4.4 hours |
| 99.99 percent (“four nines”) | 4.32 min | about 52.6 min |
| 99.999 percent (“five nines”) | 26 seconds | about 5.3 min |
The formula is simply:
allowed downtime = period x (1 - availability)
30-day month = 30 x 24 x 60 = 43,200 minutes
99.9 percent -> 43,200 x 0.001 = 43.2 minutes
Each extra nine costs far more than the one before it. Going from 99 to 99.9 percent may mean automatic restarts and monitoring; going to 99.99 percent usually needs redundancy at every layer, automated failover and a 24-hour response. Choose the target the business needs and can pay for, then measure whether you meet it.
3. Series and parallel: why dependencies matter
In series (every part must work), availabilities multiply:
web x database x storage = 0.999 x 0.999 x 0.998 = 0.996 (99.6 percent)
A chain of five “three-nines” parts is only about 99.5 percent. This is why long dependency chains are fragile.
In parallel (the service works if at least one copy works), unavailabilities multiply:
two servers at 99 percent: 1 - (0.01 x 0.01) = 0.9999 (99.99 percent)
Redundancy gives huge gains, if failures are independent. Two servers on one power supply, one switch, one hypervisor host or one bad configuration push will fail together, and the maths above is too optimistic. Ask what the copies share: that is the real failure domain.
4. MTBF and MTTR: you can improve either
availability = MTBF / (MTBF + MTTR)
A component that fails once a month (MTBF 720 hours) and takes 4 hours to fix is 720 / 724 = 99.45 percent available. Halving the repair time to 2 hours gives 99.72 percent. Faster recovery is as valuable as fewer failures, and it is usually cheaper: monitoring that detects problems in a minute, a runbook, a tested restore and automation shorten MTTR.
5. SLOs and error budgets
Pick a few indicators users feel (successful requests, latency, freshness of data), set an objective for each, and measure over a rolling window:
- SLI: good requests / total requests.
- SLO: 99.9 percent over 30 days.
- Error budget: 0.1 percent: 43.2 minutes of full outage, or an equivalent number of failed requests.
Use the budget as a decision tool. While plenty remains, the team may deploy changes, run experiments and do risky maintenance. When it is nearly gone, freeze risky changes and spend time on reliability. Alert on how fast the budget is burning, not on every blip.
6. How systems really fail
Most outages come from a short list. Use it as a checklist when you design monitoring and recovery:
| Failure mode | Examples | Defence |
|---|---|---|
| Hardware | Disk, power supply, memory, NIC, whole host | Redundancy, spares, SMART and hardware monitoring |
| Capacity | Full disk, full inode table, out of memory, connection limits, expired licence | Capacity alerts, trends, forecasts |
| Software and configuration | Bad release, wrong setting, memory leak, expired certificate | Staged rollout, config management, rollback, certificate monitoring |
| Dependencies | DNS, identity provider, upstream API, time source | Checks on dependencies, timeouts, fallbacks |
| People | Deleted the wrong thing, ran a command on the wrong host | Least privilege, review, backups, confirmation steps |
| Security | Ransomware, compromised credentials, DDoS | Defence in depth, immutable backups, incident plan |
| Environment | Power cut, cooling, flood, fire, ISP outage | Second site, UPS and generator, multiple providers |
Find single points of failure by walking the path of one request or one user: for each box, cable, account and service ask “if this vanished now, what stops, and how would we recover?” Write the answers down. The list becomes your monitoring plan, your backup plan and your disaster-recovery plan.
7. Hands-on lab: the command line
Lab: first look at a server's health and uptime
A small web server has been unreliable. Before you design anything, read the facts: how long it has been up, what is full, which services failed, and what the last boot looked like.
Objectives
- See how long the server has been running and its load.
- Check disk space: a full disk is the commonest capacity failure.
- Check inode usage as well as space.
- Check memory and swap.
- List services that failed to start or crashed.
- Show the last error-level log lines since this boot.
8. Hands-on lab: the reliability arithmetic
9. Common mistakes
| Mistake | Better |
|---|---|
| Promising 100 percent | Nothing is 100 percent. State a target and an error budget |
| Measuring availability only from inside | Add outside-in checks and define “working” from the user’s view |
| Counting redundant copies that share a failure domain | List what the copies share (power, switch, host, configuration) |
| A tight SLA with no SLO behind it | Set stricter internal SLOs than the contract |
| Buying more nines than the business needs | Tie the target to the cost of downtime (next lesson) |
| Focusing only on preventing failure | Shorten recovery time too: monitoring, runbooks, tested restores |
10. Key takeaways
- Availability converts to minutes: allowed downtime = period x (1 - availability). Three nines is about 43 minutes a month.
- Series parts multiply and weaken the total; parallel copies multiply the unavailability and strengthen it, only if their failures are independent.
- Availability = MTBF / (MTBF + MTTR): fixing faster is as valuable as failing less.
- An SLO is an internal target; the error budget is what it allows to go wrong and guides how much risk to take.
- Learn the common failure modes and hunt single points of failure: that list drives monitoring, backup and recovery.
Your manager asks for 'five nines' for the company website. What do you ask before agreeing?
What does an hour of downtime cost, and what are users actually promised today? Five nines allows about 26 seconds a month, which needs redundant everything, automatic failover, and round-the-clock response, and would likely cost far more than the downtime it prevents. Ask what the website is for, measure current availability, agree a realistic SLO (often three nines is plenty for a brochure site), and show the cost of each extra nine.
Can You Explain It?
Close the lesson and answer these without looking back. The goal isn't the wording — it's whether you've formed a usable mental model.
- Convert 99.95 percent availability into minutes of allowed downtime in a month, and explain how you did it.
- Explain why two servers in one rack on one power feed may not give the availability the maths promises.
- Describe how an error budget changes the conversation between operations and developers.
🧪 Want to practise this on your own computer? See how to set up your lab →