Chapter 13 · The vocabulary & engineering of staying up
Resilience, HA & DR — designed to fail, designed to recover
Resilience is not a feature; it is a property of the whole system, paid for by money, latency, and operational complexity. This chapter pins down the vocabulary (availability, reliability, resilience, recoverability), the targets (RPO/RTO and the nines), the patterns (N+1 to active-active), and the discipline (chaos engineering, BCP/ISO 22301, runbooks) that turn "we hope it stays up" into a measured engineering posture.
13.1 · The vocabulary — five words that aren't synonyms
Term
Definition
Measured by
Availability
Fraction of time a system is in a usable state. Uptime ÷ (Uptime + Downtime).
"Nines" — 99.9 %, 99.99 %, etc.
Reliability
Probability the system performs correctly over a stated interval under stated conditions. About doing the right thing.
MTBF, error rate, success ratio
Resilience
The system's ability to absorb disruption and continue providing acceptable service, possibly degraded.
Time-to-degrade, time-to-recover, blast radius
Robustness
Ability to operate correctly across a wide range of inputs and conditions, including malformed input — graceful tolerance.
Fuzz survival, defect rate per input class
Recoverability
The system's ability to return to a correct state after a failure, possibly with data loss bounded by RPO.
RTO, RPO, recovery success rate
The compact way to remember. Availability is are we up? Reliability is do we behave correctly? Resilience is do we stay useful under stress? Robustness is do bad inputs break us? Recoverability is can we get back?
13.2 · Availability classes — the nines and the bill
SLA
Downtime / year
Downtime / month
Downtime / week
Typical use
90 % (one nine)
36.5 days
72 h
16.8 h
Lab / sandbox
99 % (two nines)
3.65 days
7.2 h
1.68 h
Internal tools
99.5 %
1.83 days
3.6 h
50 m
Tier-3 enterprise
99.9 % (three nines)
8.77 h
43.2 m
10.1 m
Most SaaS — common default
99.95 %
4.38 h
21.6 m
5 m
Tier-2 customer-facing
99.99 % (four nines)
52.6 m
4.32 m
1.01 m
Payments, core banking
99.999 % (five nines)
5.26 m
26 s
6 s
Telco core, stock exchange
99.9999 % (six nines)
31.5 s
2.6 s
~0.6 s
Marketing only — rarely achievable end-to-end
The cost curve is exponential. Each added nine typically doubles or triples infrastructure spend and operational complexity. The right question is not "how many nines can we get?" but "what nines does the business value justify?"
13.3 · RPO, RTO and the MTs
The two recovery objectives — and the four mean-time metrics — locate every failure on a timeline.
Term
Full name
What it measures
RPO
Recovery Point Objective
Maximum tolerable data loss (time gap between last safe backup and incident)
RTO
Recovery Time Objective
Maximum tolerable time to restore service
MTBF
Mean Time Between Failures
Average uptime between incidents — reliability proxy
MTTD
Mean Time To Detect
Incident start → alarm triggered
MTTA
Mean Time To Acknowledge
Alarm triggered → on-call engages
MTTR
Mean Time To Restore (or Resolve / Repair / Recover — usage varies)
Engagement → service restored
13.4 · Failure modes — beyond "it crashed"
Mode
Definition
Example
Single point of failure (SPOF)
Element whose failure brings down the whole system
One DB primary, no replica
Correlated failure
Many components failing together due to shared dependency
Whole AZ loses power; all instances using the same AMI hit the same bug
Gray failure (Microsoft, 2017)
Component is "up" by its own metrics but unhealthy to clients — partial, asymmetric, intermittent
Node returns 200s to health checks but drops 10 % of real traffic
Cascading failure
One component's failure overloads its neighbours, propagating across the system
Retry storm after a backend slowdown takes down the rest of the platform
Metastable failure (Bronson, 2021)
System stuck in a degraded state by its own retries / queues even after the trigger is gone
Restart of the back-end doesn't help because the client queue keeps it overloaded
Byzantine failure
Component returns incorrect results without crashing
Corrupted memory, faulty driver returning bad data
13.5 · HA patterns
Pattern
Definition
Used for
N+1
N nodes to serve load + 1 spare
Stateless web tiers, load balancers
N+M
N for load + M spares; tolerate M concurrent failures
Higher tier; M sized to failure correlation expectations
2N
Full duplicate capacity — typically across two sites
Telco, payments rails
Active-Active
All nodes serve traffic, share load; failures absorbed by remaining capacity
Stateless services; multi-region SaaS
Active-Passive
Standby idle until primary fails; promoted on failover
Stateful DBs without multi-master support
Leader election
One node holds leader role at a time; on failure, election selects new leader
Coordinators, schedulers; via etcd, Zookeeper, Consul
13.6 · DR strategies — the AWS four (plus Active-Active)
Strategy
RPO
RTO
Cost
Description
Backup & Restore
hours
hours–day
$ (lowest)
Restore from snapshots into a fresh region/account on failure
Pilot Light
minutes
tens of minutes
$$
Core data continuously replicated; compute powered off, scaled up on failover
Warm Standby
seconds
minutes
$$$
Scaled-down copy of full stack always running in DR; scale up on failover
Hot Standby / Multi-Site Active-Active
~0 (sync) / seconds (async)
seconds
$$$$
Full prod-grade stack in both regions, serving traffic; no failover delay
13.7 · Multi-region replication — the trilemma
You can pick two of: strong consistency, low latency on writes, geographic distance between replicas. The speed of light is non-negotiable.
Mode
Consistency
Write latency
Data loss on region failure
Synchronous replication (cross-region)
Strong (linearizable)
Cross-region RTT added to every write (50–150 ms)
Zero (RPO=0)
Asynchronous replication
Eventual
Local write speed
Up to replication lag (seconds–minutes)
Semi-synchronous
Read-your-writes within region
Local + intra-region ack
Bounded by configurable threshold
Multi-master (CRDT-based or last-writer-wins)
Eventual / convergent
Local write speed
Conflicts merged per CRDT rules
13.8 · Business Continuity Planning — ISO 22301
ISO 22301:2019 — Security and resilience — Business continuity management systems defines the BCMS standard. Adoption is required in regulated sectors (banking, telco, healthcare) and increasingly demanded by enterprise customers.
BIA — Business Impact Analysis: quantifies the operational, financial, reputational, regulatory impact of disruption per process.
Exponential back-off + full jitter (AWS recommendation, 2015)
Timeout
Bound waiting time per call; never inherit upstream timeouts unbounded
Per-call deadlines (gRPC), per-hop timeouts in mesh
Fallback
Degrade gracefully when dependency is unavailable
Cached response, default value, reduced feature
Throttling / rate limiting
Protect downstream from overload
Token bucket, leaky bucket, API GW quotas
Queue-based load levelling
Absorb traffic spikes; smooth backend load
SQS, Service Bus, Pub/Sub between front-end and worker
Hedging (Tail at Scale, Dean & Barroso 2013)
Reduce p99 latency by sending duplicate request to second replica after a delay
gRPC hedging policy, Envoy hedging filter
Cell-based architecture
Limit blast radius — failures contained to one cell
AWS internal pattern; Slack, Stripe writeups
Shuffle sharding
Reduce probability that two customers share all failure-domain components
Route 53 Resolver, ALB, internal AWS services
13.10 · Chaos engineering
Netflix's Chaos Monkey (2011) and the subsequent Principles of Chaos Engineering (principlesofchaos.org, Basiri et al. 2014) reframed resilience from "hope nothing breaks" to "deliberately break things in controlled experiments to discover weaknesses before customers do."
Ownership — every runbook has a named owner who must rehearse it on a cadence.
Drill cadence — tier-0 systems quarterly; tier-1 semi-annually; tier-2 annually.
Drill type
What happens
Risk to prod
Table-top
Walk through the runbook in a meeting; identify gaps without touching systems
None
Partial failover
Failover a subset of services or one AZ; verify; fail back
Low–medium
Full failover
Complete region failover; operate from DR; eventual fail back
Medium–high (the point is to find the issues)
Game day
Cross-team scenario exercise (chaos + IR + comms)
Variable; scoped per exercise
Why is "MTTR" ambiguous?
It is used to mean Mean Time To Repair, Restore, Resolve, or Recover — and these are not equivalent (a service can be restored without being fully repaired). When you adopt MTTR as an SLI, write the exact definition next to it in the runbook.
Are availability and reliability the same number?
No. A system that returns wrong answers 5 % of the time is 100 % available but only 95 % reliable. Architects who conflate them ship systems that pass uptime SLOs while corrupting data.
13.13 · Self-check
Q1 · A system is reachable 100 % of the time but returns malformed JSON 8 % of the time. Which quality is failing?
Availability
Reliability
Recoverability
Robustness
Q2 · You need RPO = 0 across two regions 1,200 km apart. What is the unavoidable cost?
Higher storage cost only
Every committed write pays the cross-region round-trip latency
Loss of strong consistency
Mandatory rewriting to NoSQL
Q3 · Which DR strategy gives the lowest RTO and the highest cost?