What it is
A system is reliable when it keeps delivering correct service over time, even though parts of it go wrong. Two terms make this precise:
- A fault is one component deviating from its specification: a process crashes, a disk returns errors, a network link drops packets, a dependency slows down, a deploy ships a bug.
- A failure is the system as a whole not delivering the service users expect: errors, wrong answers or answers too late to be useful.
Faults cause failures only when nothing stops them. Fault tolerance is the set of techniques that keep faults from becoming failures. Reliability is closely related to availability (the share of time or requests served), but broader: a system that answers quickly with wrong data is available and not reliable.
Why it exists
At scale, faults are not exceptional events; they are a steady background rate. Hard disks have annual failure rates of around 1–2% in large published fleets; with tens of thousands of disks, several fail every day. Add kernel bugs, bad deploys, expired certificates, overloaded dependencies and human mistakes, and something in a large system is always broken. Designing for "nothing fails" is designing for a system that does not exist. Reliability engineering accepts faults and limits how often and how badly they reach users.
How it works
Measure from the outside. Reliability is judged by users, so the main signals are the error rate and latency of real requests (later formalised as SLIs and SLOs), not whether every process is running.
MTBF and MTTR. Mean time between failures (MTBF) says how often a component fails; mean time to repair (MTTR) says how long it stays broken. For a single component, availability ≈ MTBF ÷ (MTBF + MTTR). MTTR includes time to detect, time to decide and time to fix, which is why teams also track mean time to detect. The formula shows two equal levers: fail less often, or repair faster. In the lesson, cutting repair from 600 ms to 200 ms took the failed share from about 30% to about 10% without changing how often the server crashed. In practice, automatic restarts, health-checked rollouts, quick rollbacks and good alerting are usually cheaper than making a component fail less.
Redundancy and detection. A spare that can carry the load, plus something that notices the fault and routes around it, turns a crash into a short blip. A load balancer's health checks are the classic example: probe every interval, eject after a number of consecutive failures. The damage is limited to the detection window (interval × threshold, plus requests already in flight).
Retries. Many faults are transient or affect one instance. If a request fails, sending it again, ideally to a different instance, often succeeds. Retries hide the detection window, but they need idempotent operations (or idempotency keys), limited attempts, and exponential backoff with jitter so that a fleet of clients does not hammer a recovering system at the same instant.
Partial faults. The hardest faults are not crashes. A server that is slow because of a failing disk, a noisy neighbour, a memory leak or lock contention still answers health probes, so it stays in rotation. Clients time out, retry and add load. These gray failures need behaviour-based detection: latency and error rate per backend, least-outstanding-requests balancing, outlier detection that ejects a backend whose metrics stand out, and deep health checks that exercise real work.
Independence. Redundancy multiplies away failure probability only if faults are independent. Two replicas on the same rack, behind the same switch, running the same bad build or depending on the same database fail together. Spreading replicas across failure domains (hosts, racks, zones, regions), staging deploys and limiting shared dependencies is what makes redundancy real.
When to use it
Every production service needs a reliability target and the basics: monitoring of user-facing errors and latency, automatic restart, more than one instance for anything users depend on, and safe retries at the edges. The more expensive techniques (multi-zone and multi-region redundancy, outlier detection, chaos experiments) scale with how much failures cost: revenue, safety, contractual SLAs.
When not to
- Batch jobs that can simply be re-run rarely need live redundancy; checkpoints and idempotent re-runs are enough.
- Retries are wrong for non-idempotent operations without deduplication, and harmful when the fault is overload: they add load exactly when there is none to spare.
- Do not chase nines that users do not need. Each extra nine costs far more than the last, and an error budget is often better spent on features.
Trade-offs
| Choice | You gain | You pay |
|---|---|---|
| Redundant instances | Crashes become blips | Cost of spare capacity; state must be shared or replicated |
| Short health check intervals | Faster detection, smaller error window | More probe traffic; more false ejections during brief hiccups |
| Client retries | Transient faults hidden from users | Extra load, retry storms if unbounded, duplicates for non-idempotent calls |
| Deep health checks | Catch broken dependencies | A shared dependency failing can eject every instance at once |
| Outlier detection | Catches slow or erroring instances | Tuning; may eject too many instances if the whole fleet degrades |
Alternatives
- Graceful degradation: when a non-essential part fails, serve a reduced experience (cached recommendations, read-only mode) instead of an error.
- Circuit breakers: stop calling a failing dependency for a while, fail fast and give it room to recover.
- Bulkheads: isolate resources per dependency or tenant so one fault cannot exhaust everything.
- Checkpoint and restart: for batch and stream processing, recover by replaying from the last consistent point instead of running hot spares.
Failure modes
- Correlated faults: replicas sharing power, network, configuration or a release fail together.
- Retry storms: thousands of clients retrying without backoff turn a short fault into a sustained overload.
- Gray failures: a slow or partially broken instance stays in rotation because liveness checks pass.
- Cascading failure: an ejected instance's traffic overloads the survivors, which then fail too.
- Hidden latent faults: a standby that has never been exercised fails when it is finally needed. Test failover regularly.
- Slow detection: alerts on averages or on host metrics miss user-facing errors; MTTR is dominated by time to notice.
In production
Teams define SLOs on user-facing error rate and latency and alert on error-budget burn rate rather than on individual hosts. They run several instances across availability zones, use health-checked load balancing with outlier detection (service meshes and modern proxies support it), and give clients timeouts, bounded retries with jitter and idempotency keys. Deploys roll out gradually with automatic rollback. Chaos experiments and game days inject faults deliberately to prove that redundancy and runbooks work. Blameless postmortems feed fixes back into both MTBF and MTTR.
Common misconceptions
- "Reliable means nothing ever breaks." Something always breaks; reliable means users rarely notice.
- "Redundancy guarantees availability." Only for independent faults, and only with detection and enough spare capacity.
- "If the health check is green, the server is fine." Liveness checks miss slow, overloaded or half-broken servers.
- "Retries are free reliability." They cost load and can duplicate side effects; without backoff and limits they make outages worse.
- "MTBF is the only number that matters." Faster repair improves availability just as much and is often cheaper.
Interview angle
Use the vocabulary precisely: faults versus failures, MTBF and MTTR, detection window. When you add redundancy, say how faults are detected and how long that takes, and whether the survivors can carry the load. Mention client timeouts, bounded retries with jitter and idempotency. Strong candidates bring up partial failures (slow nodes, gray failures) and correlated failures (same zone, same deploy) without being prompted, and explain how they would detect and contain them.
Model assumptions
The simulation is a simplified model, not a benchmark. App servers have 6 workers, a lognormal service time of 40 ms mean (cv 0.3) and room for 20 waiting requests. Users send 60 requests per second (Poisson arrivals) and time out after 250 ms; from the retries step on they retry up to two more times with exponential backoff (20 ms base, full jitter). The load balancer probes every 250 ms (2 failures eject, 2 successes restore) and only checks whether a server is up. A degraded server runs four times slower. The crash/repair cycles compress weeks of MTBF into seconds so the pattern is visible; the ratios between MTBF and MTTR are the point, not the durations. Outlier detection and deep health checks are described but not simulated.