BLUEPRINT · The Solution Architect's Codex
Ch 13 · Resilience, HA & DR
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

TermDefinitionMeasured by
AvailabilityFraction of time a system is in a usable state. Uptime ÷ (Uptime + Downtime)."Nines" — 99.9 %, 99.99 %, etc.
ReliabilityProbability the system performs correctly over a stated interval under stated conditions. About doing the right thing.MTBF, error rate, success ratio
ResilienceThe system's ability to absorb disruption and continue providing acceptable service, possibly degraded.Time-to-degrade, time-to-recover, blast radius
RobustnessAbility to operate correctly across a wide range of inputs and conditions, including malformed input — graceful tolerance.Fuzz survival, defect rate per input class
RecoverabilityThe 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

SLADowntime / yearDowntime / monthDowntime / weekTypical use
90 % (one nine)36.5 days72 h16.8 hLab / sandbox
99 % (two nines)3.65 days7.2 h1.68 hInternal tools
99.5 %1.83 days3.6 h50 mTier-3 enterprise
99.9 % (three nines)8.77 h43.2 m10.1 mMost SaaS — common default
99.95 %4.38 h21.6 m5 mTier-2 customer-facing
99.99 % (four nines)52.6 m4.32 m1.01 mPayments, core banking
99.999 % (five nines)5.26 m26 s6 sTelco core, stock exchange
99.9999 % (six nines)31.5 s2.6 s~0.6 sMarketing 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.

Last good backup Incident starts Detected Acknowledged Service restored RPO (data loss tolerated) RTO (time to recover) MTTD MTTA MTTR Failure timeline · RPO/RTO + MTTD/MTTA/MTTR
TermFull nameWhat it measures
RPORecovery Point ObjectiveMaximum tolerable data loss (time gap between last safe backup and incident)
RTORecovery Time ObjectiveMaximum tolerable time to restore service
MTBFMean Time Between FailuresAverage uptime between incidents — reliability proxy
MTTDMean Time To DetectIncident start → alarm triggered
MTTAMean Time To AcknowledgeAlarm triggered → on-call engages
MTTRMean Time To Restore (or Resolve / Repair / Recover — usage varies)Engagement → service restored

13.4 · Failure modes — beyond "it crashed"

ModeDefinitionExample
Single point of failure (SPOF)Element whose failure brings down the whole systemOne DB primary, no replica
Correlated failureMany components failing together due to shared dependencyWhole 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, intermittentNode returns 200s to health checks but drops 10 % of real traffic
Cascading failureOne component's failure overloads its neighbours, propagating across the systemRetry 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 goneRestart of the back-end doesn't help because the client queue keeps it overloaded
Byzantine failureComponent returns incorrect results without crashingCorrupted memory, faulty driver returning bad data

13.5 · HA patterns

PatternDefinitionUsed for
N+1N nodes to serve load + 1 spareStateless web tiers, load balancers
N+MN for load + M spares; tolerate M concurrent failuresHigher tier; M sized to failure correlation expectations
2NFull duplicate capacity — typically across two sitesTelco, payments rails
Active-ActiveAll nodes serve traffic, share load; failures absorbed by remaining capacityStateless services; multi-region SaaS
Active-PassiveStandby idle until primary fails; promoted on failoverStateful DBs without multi-master support
Leader electionOne node holds leader role at a time; on failure, election selects new leaderCoordinators, schedulers; via etcd, Zookeeper, Consul
Quorum (RAFT, Paxos)Majority of nodes must agree to make progressDistributed consensus stores (etcd, Consul, Zookeeper, CockroachDB, Spanner)
Shared-nothingEach node has its own storage and compute; no shared stateHorizontally-scalable analytical DBs, sharded OLTP

13.6 · DR strategies — the AWS four (plus Active-Active)

StrategyRPORTOCostDescription
Backup & Restorehourshours–day$ (lowest)Restore from snapshots into a fresh region/account on failure
Pilot Lightminutestens of minutes$$Core data continuously replicated; compute powered off, scaled up on failover
Warm Standbysecondsminutes$$$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.

ModeConsistencyWrite latencyData loss on region failure
Synchronous replication (cross-region)Strong (linearizable)Cross-region RTT added to every write (50–150 ms)Zero (RPO=0)
Asynchronous replicationEventualLocal write speedUp to replication lag (seconds–minutes)
Semi-synchronousRead-your-writes within regionLocal + intra-region ackBounded by configurable threshold
Multi-master (CRDT-based or last-writer-wins)Eventual / convergentLocal write speedConflicts 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.
  • Criticality tiers — Tier 0 (mission critical, RTO < 1 h), Tier 1 (essential, < 4 h), Tier 2 (important, < 24 h), Tier 3 (deferrable, days).
  • MTPD / MTPoD — Maximum Tolerable Period of Disruption.
  • MAO — Maximum Acceptable Outage.
  • Recovery strategies — alternate sites, workforce relocation, supplier diversification.
  • DR is a subset of BCP — DR addresses technology; BCP addresses the whole organisation including people, premises, suppliers.

13.9 · Resilience patterns (cloud-native)

PatternProblem solvedReference implementation
Circuit breaker (Nygard, Release It! 2007)Stop calling a failing dependency until it recoversResilience4j, Polly, Istio outlier detection, Hystrix (legacy)
BulkheadIsolate resources so one tenant/feature cannot drain the whole poolPer-dependency thread pools, per-tenant connection limits
Retry with jitterAvoid retry storms (synchronised retries)Exponential back-off + full jitter (AWS recommendation, 2015)
TimeoutBound waiting time per call; never inherit upstream timeouts unboundedPer-call deadlines (gRPC), per-hop timeouts in mesh
FallbackDegrade gracefully when dependency is unavailableCached response, default value, reduced feature
Throttling / rate limitingProtect downstream from overloadToken bucket, leaky bucket, API GW quotas
Queue-based load levellingAbsorb traffic spikes; smooth backend loadSQS, 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 delaygRPC hedging policy, Envoy hedging filter
Cell-based architectureLimit blast radius — failures contained to one cellAWS internal pattern; Slack, Stripe writeups
Shuffle shardingReduce probability that two customers share all failure-domain componentsRoute 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."

  1. Build a hypothesis around steady-state behaviour.
  2. Vary real-world events (server crashes, network partitions, latency spikes).
  3. Run experiments in production (or as close to it as possible).
  4. Automate experiments to run continuously.
  5. Minimise blast radius.
ToolVendor / projectBest for
Chaos MeshCNCFKubernetes-native chaos
LitmusChaosCNCFWorkflow-based chaos pipelines
GremlinGremlin Inc.Enterprise SaaS, broad targets
AWS Fault Injection Service (FIS)AWSNative AWS resource fault injection
Azure Chaos StudioMicrosoftNative Azure fault injection
SteadybitSteadybitReliability platform with experiment templates

13.11 · SRE vocabulary — SLI, SLO, SLA, error budget

TermDefinitionExample
SLIService Level Indicator — a measured signalFraction of HTTP requests with status < 500
SLOService Level Objective — internal target on an SLI99.95 % of requests under 300 ms over rolling 28 days
SLAService Level Agreement — contractual, customer-facing, with consequence99.9 % monthly uptime or service credit
Error budget1 − SLO. The allowed unreliability — a currency for shipping risk99.9 % SLO = 0.1 % budget = ~43 min/month
Burn rateHow fast the error budget is being consumed relative to the window14.4× burn = full budget gone in 2 h on a 30-day window

Deeper SRE coverage and the operational practice live in the companion STACK volume (Ch 17).

13.12 · DR runbooks & drills

  • Contents — pre-conditions, decision authority (who declares disaster), step-by-step technical procedure, rollback, comms templates, post-incident validation checklist, recovery sign-off.
  • 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 typeWhat happensRisk to prod
Table-topWalk through the runbook in a meeting; identify gaps without touching systemsNone
Partial failoverFailover a subset of services or one AZ; verify; fail backLow–medium
Full failoverComplete region failover; operate from DR; eventual fail backMedium–high (the point is to find the issues)
Game dayCross-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?
Backup & Restore
Pilot Light
Warm Standby
Hot Standby / Multi-Site Active-Active