Skip to content

Reliability, resilience and fault tolerance

In everyday talk, a system that “doesn’t break” is reliable, available, resilient and fault tolerant, all at once. In design talk the words are different properties, and mixing them up leads to fixing the wrong thing. Each one asks a different question.

Property The question it asks Measured by
Availability Is it there when someone asks? The share of time or requests that are served
Reliability Does it do the right thing, again and again? Correct results over time, failures per period
Fault tolerance Does one fault stop the service? Whether a failed component is absorbed, and how many can fail
Resilience How well does it recover and adapt after a disruption? How fast and how fully it returns to service

The standard definitions in dependability research put it this way: availability is readiness for correct service, and reliability is the continuity of correct service. A system that fails once an hour but is back within a second is 99.97% available (3,600 ÷ 3,601) and not very reliable, because it fails 24 times a day. A system that answers every request but sometimes returns a wrong total is available, and not reliable either.

Mental model. Availability asks if it is up. Reliability asks if it is right. Fault tolerance asks if one break is enough to stop it. Resilience asks how it gets back up.

The most useful distinction is between two words that sound alike.

  • A fault is one component deviating from what it should do: a disk that dies, a bug, a bad configuration, a network cable pulled out.
  • A failure is the system as a whole no longer providing its service to its users.

Faults are inevitable. Disks fail, memory flips bits, people deploy mistakes. Fault tolerance is the discipline of stopping faults from becoming failures. The design decides whether a fault reaches the user.

Two techniques do most of the work, and AWS’s whitepaper separates them:

  • Fault tolerance uses spare, redundant capacity. When one subsystem fails, another picks up its work. With true spares, several subsystems must fail at once before the workload is affected.
  • Fault isolation limits how far a fault spreads. The system is divided into parts that fail independently, so a failure stays inside its part. The idea goes by names such as cells, shards and availability zones, and by the phrase “limiting the blast radius”.

Eight statements. Which property is each one about?

Challenge

Which property is it?

Availability, reliability, fault tolerance and resilience are used as if they meant the same thing. They answer different questions. Put each statement under the property it is about.

Sorting needs JavaScript.

Categories

Availability
Is it there when someone asks?
Reliability
Does it do the right thing, again and again?
Fault tolerance
Does one fault stop the service?
Resilience
How well does it recover and adapt after a disruption?
  1. Line 1 of 899.95% of checkout requests succeeded last month.
  2. Line 2 of 8The status page shows the service was up 99.99% of the year.
  3. Line 3 of 8Over six months of orders, every invoice total was computed correctly.
  4. Line 4 of 8For a year the system did exactly what its specification says, on every input that was tried.
  5. Line 5 of 8A server dies, and a second one answers its requests with no visible interruption.
  6. Line 6 of 8With one of three replicas offline, reads and writes carry on, because the other two hold the data.
  7. Line 7 of 8After an outage in one data centre, the system started new servers in another and was serving again within 10 minutes.
  8. Line 8 of 8A bad release is spotted by monitoring and rolled back automatically within minutes.

Check your answers at least once before looking at the answers.

How much does a spare buy? Take one component that is 99.5% available. With one copy, it is down 0.5% of the time. With a spare, the pair is down only when both are down together. If they fail independently, the chance of that is 0.5% × 0.5% = 0.0025%.

Set the calculator below to 99.5% with one component and see what each additional copy does.

Availability calculator

Your numbers

%

The share of time one copy of one component works. 99.9% means it is down about 8.8 hours a year. A provider's published figure is a promise, so measure what you actually get.

components

How many components in a row must all work for a request to succeed: the hard dependencies of the request path, each counted once.

copies

How many copies of each component can serve a request, so that one failure does not stop it. 1 means no redundancy.

Changing the numbers needs JavaScript. The result is for the starting numbers.

Result

System availability99.999988%

That allows 3.94 s of downtime a year.

How it is calculated

Each step shows its formula, the numbers that go in, and the figure that comes out.

  1. One component, with its copies

    A_c = 1 − (1 − a)^r

    A group of copies is down only when every copy is down at the same time, so its unavailability is one copy's unavailability to the power r.

    a availability of one copy
    99.5%
    r copies of each component
    3

    A_c availability of one component, with its copies99.999988%

  2. The whole chain

    A = A_c^n

    A request needs every component in the chain, so the availabilities multiply. The chain is up only when all of them are.

    A_c availability of one component, with its copies
    99.999988%
    n components in the chain
    1

    A system availability99.999988%

  3. Downtime in a year

    D = (1 − A) × T

    The time the chain is down is the unavailable share of the year (365 days).

    A system availability
    99.999988%
    T time in a year
    365 d

    D downtime in a year3.94 s

What each level of availability allows
AvailabilityDown per yearDown per month (30 days)Down per day
99%3.65 d7.2 h14.4 min
99.9%8.76 h43.2 min1.44 min
99.95%4.38 h21.6 min43.2 s
99.99%52.6 min4.32 min8.64 s
99.999%5.26 min25.9 s864 ms
99.999988% · your system3.94 s324 ms10.8 ms
Model notes

Assumptions

  • Components fail independently of one another. Failures with a shared cause (a bad deploy, one power supply, one data centre) break this, so real copies are less independent than this, and the real availability is lower than the figure here.
  • A copy takes over instantly and completely when another fails. Real failover takes time, and requests fail while it happens, so copies buy fewer nines than the arithmetic says.

Simplifications

  • Availability here is the share of time that the system is up. Many teams measure the share of requests that succeed instead, which is about the same only when traffic is even through the day.
  • The calculator does not claim more than twelve nines. Beyond about six, a figure says more about the model's assumptions than about any real system, and the arithmetic cannot tell a copy's failure from a shared one.
  • A year is 365 days and a month is 30 days.

Parameter values are illustrative. They are not benchmarks of any real product.

With three copies (two spares), unavailability is 0.5% × 0.5% × 0.5%, which is 0.0000125%. The component is available 99.999988% of the time, or about 3.94 seconds of downtime a year. A fourth copy would take it to about two hundredths of a second, which is a gain that nobody can see.

AWS makes the same point: spares cost at least as much as the original, each one adds complexity, and after about three the returns are tiny, so use the fewest that meet the target. The point to take from this is that redundancy is an optimisation problem, not a rule: too few spares and the system fails more than it should, too many and it costs too much.

Spares must also be placed against the right fault. Say a workload needs 10 instances to carry its peak, and runs them all in one availability zone. When that zone fails, all 10 go together, so adding one spare instance protects against nothing. Putting 10 more in a second zone works, at the price of 20 instances. Spreading across three zones, with 5 in each, needs only 15 instances for the same protection: any one zone can fail and 10 remain. The unit of failure sets the size of the spare.

What happens if a spare has silently failed?

Section titled “What happens if a spare has silently failed?”

A system has three replicas, so it tolerates one failing. One replica fails at 2 a.m., and nobody notices. Nothing has failed from the users’ point of view: the other two carry on. The system is now running with no spare at all, and it looks the same as before.

When a second replica fails on Thursday, the system fails. In the post-mortem the team will say that the system was fault tolerant, and had been. It had not been for four days.

Redundancy hides faults, which means it makes them easier to miss. A fault-tolerant system has to detect and repair faults as well as absorb them, and to report them even when users notice nothing. Systems fail because the second fault arrives before the first was repaired, and the time to repair is therefore part of the design. This is the link to the previous lesson: recovery speed is the MTTR, and it is what resilience measures.

  • Availability asks whether it is there. Reliability asks whether it is right. Fault tolerance asks whether one break stops it. Resilience asks how it recovers.
  • A fault is a component deviating. A failure is the system no longer serving its users. Fault tolerance stops faults from becoming failures.
  • Spares give fault tolerance, and isolation limits how far a fault spreads.
  • Spares multiply unavailabilities: a 99.5% component with two spares is about 99.999988% available. After about three spares the gain is tiny.
  • Size spares to the unit of failure: spreading 10 instances’ worth of capacity across three zones takes 15 instances, not 20.
  • A spare that has silently failed leaves the system one fault from failure. Detect and repair faults, and report them.

Next: durability, which is not the same as availability.

Your progress

Built by GhaziAlibi.

© ShardCraft. All rights reserved.