Unit 15 of 15 · about 5 hours · measure
A load, chaos, backup and restore campaign with capacity, recovery and migration costs
Every unit in this section feeds this campaign. One compound incident, run on schedule and reconstructed from stored evidence, turns the separate mechanisms into an operated system.
You'll be able to
- Run a scheduled campaign of load, fault, backup and restore scenarios with named triggers and abort conditions.
- Measure SLO impact, recovery point and time, backlog and cost on every scenario.
- Keep raw histories with evidence labels that separate simulated, local and inferred claims.
Covers
Read
In this order, only the parts listed
0 of 4 done
- Chaos: experiment framework and blast radiusHLD Handbook - Reliability, Operations and Security at Scale
The Principles of Chaos; The experiment framework; Failure modes to inject; Blast radius control
Read for the steady-state, hypothesis and blast-radius structure. Run the experiments on your local processes, not on shared infrastructure.
- Error-path testing: why the campaign starts with faultsSimple Testing Can Prevent Most Critical Failures (Yuan et al., 2014)
Introduction and Table 1: 198 user-reported failures across Cassandra, HBase, HDFS, MapReduce and Redis, 48 of them catastrophic; of those, 92% involved mishandled explicitly signaled non-fatal errors and 58% were detectable by simple tests. Section 3.2 and Table 5: 98% of the sampled failures needed at most 3 nodes
Read as the priority argument: error paths first, scale later. These are proportions of a 2014 sample, not a bound on your system or a measure of risk your tests remove.
- Cascades: testing until failure and incident responseGoogle SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and Recovery
Testing for Cascading Failures (Test Until Failure and Beyond, Test Popular Clients); Triggering Conditions for Cascading Failures (Process Death, Process Updates, New Rollouts)
- Incident corpus: triggers for the scenario listMetastable Failures in the Wild (Huang et al., 2022)
Table 1 public-source incidents as the trigger catalog (retry, scale-up, power loss rows); Section 1 study scope (22 failures, 11 organizations)
Focus on
- Every scenario states steady state, trigger, blast-radius bound and abort condition before it runs. A chaos run without an abort condition is an unplanned outage.
- Start with error paths, not scale. In the testing paper's sample most catastrophic failures came from mishandled signaled errors and almost all failures needed at most three nodes; load comes after the handlers are correct.
- Triggers come from the incident corpus: retry storms, bad rollouts, process death, cache loss. Each scenario names which catalog row it replays.
- Cost rows are measured, not estimated: provisioned capacity, recovery time, migration traffic and backlog per scenario, each labeled with the setup that produced it.
Common mistakes · 3
- Running chaos before error-path tests pass. Random faults on broken handlers produce noise, not signal; the paper's order is unit-testable faults first.
- Quoting incident counts as rates. 22 failures across 11 organizations describe a sample of public reports, not the probability of your next outage.
- Ending the campaign at recovery. The ledger needs cost rows too: capacity held, traffic moved and backlog absorbed, or the next incident cannot be budgeted.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.Why does the campaign test error handlers before running load scenarios?Answer
In the 2014 sample, 92% of the 48 catastrophic failures involved mishandled explicitly signaled errors and 58% were detectable by simple tests. That motivates testing handlers early; it does not measure how much risk your tests remove.
2.A scenario replays a cache-loss row from the incident catalog. What must its card name?Answer
Steady-state hit rate, the loss trigger, the blast-radius bound (which tenants and traffic share), the abort condition, and the recovery and cost rows to measure.
3.Recovery completed but the ledger has no cost rows. Is the scenario done?Answer
No. Without capacity, traffic and backlog numbers the run cannot be budgeted or compared, so the campaign objective is unmet.
4.A fault needs 5 nodes to reproduce. Does that contradict the testing paper?Answer
No. The paper found that 98% of sampled failures needed at most 3 nodes, not all of them, and its sample already has larger cases. Label the 5-node result by its method: simulated if a simulator produced it, local measured if local processes did.
You're done when
Your campaign runs on schedule with experiment cards, abort conditions, reconstructed histories and a filled cost ledger, and every claim carries its evidence label.
Only when you can do this without notes.
Leads to
- Jepsen generator, client, nemesis and checker roles and a fault and workload coverage matrixExtend the campaign with generator, nemesis and checker roles.
- Raw histories, evidence labels, an independent reproduction package and a skeptical defensePackage the campaign histories as an independent reproduction.
Notes
Resources · 4 for this unit, 13 more in the section
- HLD Handbook - Reliability, Operations and Security at ScaleHLD Handbook · primary
Read Part 6 observability, SLOs, resilience, overload, deployments, chaos, incidents and health, then Part 7 authentication, mTLS, secrets, tenancy and data governance chapters relevant to the capstone. Skip unrelated case studies.
- Google SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and RecoveryGoogle · required
Read SRE Chapter 4 (service level objectives), 6 (monitoring distributed systems), 21 (handling overload), 22 (addressing cascading failures), 14 (managing incidents) and 15 (postmortem culture); Workbook Chapter 2 (implementing SLOs) and 5 (alerting on SLOs); and Building Secure and Reliable Systems Chapter 5 (least privilege) and 9 (design for recovery). Convert each into one alert, limit, load test or runbook action in the capstone.
- Metastable Failures in the Wild (Huang et al., 2022)USENIX OSDI · support
Read the incident study for how retries and load sustain outages after the trigger ends; it is a sample of public reports, not a rate.
- Simple Testing Can Prevent Most Critical Failures (Yuan et al., 2014)USENIX OSDI · support
Read the findings on error-handling code and how few nodes and events reproduce most failures, as the case for testing error paths in your campaign. Its bounds come from one sample of 2014 systems.
Also in this section
- DDIA 2e - Chapters 2, 5 and 14Martin Kleppmann and Chris Riccomini · support
Use Chapter 2 "Describing Performance" for percentile and response-time vocabulary and Chapter 5 for compatibility during rolling upgrades. Chapter 14 is about predictive analytics, privacy and data governance, not operations: read its "Privacy and Tracking" section for the retention and deletion units.
- Metastable Failures in Distributed Systems (Bronson et al., 2021)HotOS · support
Read the trigger and sustaining-effect model of metastable failure and the retry and shedding design prompts. Its model illustrates; it does not predict.
- Gray Failure: The Achilles' Heel of Cloud-Scale Systems (Huang et al., 2017)Microsoft Research · support
Read the gray-failure model (differential observability between a detector and its clients) as vocabulary for telemetry and failure detection.
- The Internals of PostgreSQL - Base Backup and Point-in-Time RecoveryHironobu Suzuki · support
Read Chapter 10 (base backup, how PITR replays WAL, timelines and incremental backup) as the real-engine model for backup integrity, recovery points and restore verification. Note the date you read it.
- Building Distributed Systems - The Tracer, The Securitor and The MigratorBuild Distributed Systems · optional
Only the first three tasks of each track are free: in The Tracer, trace-context propagation, span lifecycle and a collector; in The Securitor, JWTs, the OAuth 2 code flow with PKCE and sessions; in The Migrator, schema migrations, expand and contract, and zero-downtime change. Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.
- SPIFFE Workload Identity and Workload APISPIFFE Project · support
Read the SPIFFE ID, X.509-SVID and trust bundle specifications and the Workload API (
FetchX509SVID,FetchX509Bundles) to design service identity, short-lived credentials and bundle rotation. A local mock is sufficient unless a real SPIRE deployment answers a specific gap. - OpenTelemetry Signals and Semantic ConventionsOpenTelemetry · support
Read signals and context propagation (W3C Trace Context
traceparent, inject and extract, baggage rules), then the semantic conventions (1.44.0) for the RPC and messaging areas with their stability status. Define bounded attributes for request, node, partition, term and offset identities, and never infer global order from display timestamps. - Replicated Log and Stream Processor - Production ContractRoadmap-Final · support
Add workload identity, tenant checks, audit, SLOs, capacity limits, backup and verified restore, mixed-version migration, rollback and reduced point-in-time ML data paths. Run one compound incident from detection through recovery.
- OWASP Threat Modeling Cheat SheetOWASP · reference
Use System Modeling (data-flow diagrams, trust boundaries, stores and processes), Threat Identification (the STRIDE table applied to components, data flows and trust boundaries) and Response and Mitigations to build the unit threat model.
- Feast Documentation - Point-in-Time Joins and Feature RetrievalFeast · support
Read Point-in-time joins (entity dataframes,
get_historical_features, TTL backward scan,filter_by_created_timestamp) and Feature retrieval (event_timestampas the inclusive upper bound,get_online_featureswithout timestamps, feature services per model version, materialize refresh). Work the join logic on tiny local tables; do not deploy Feast. Page read 2026-10-15 (v0.66-branch documentation). - MLflow Model Registry DocsMLflow · support
Read the Model Registry page (registered models, versions, lineage to the producing run, aliases such as @champion, and tags) and the registry tutorial promotion flow. Stages are deprecated since MLflow 2.9; use aliases and tags. Page read 2026-10-15; the versioned docs move, so re-pin the version you read.
- DVC Docs - Data VersioningDVC · support
Read
dvc add(Description and Example: Single file) for.dvccontent-hash sidecars, thedvc.yamlpage with itsdvc.lock filesection for pipeline state, andpushandpullfor transfer. A local directory remote is enough; do not set up cloud storage. Page read 2026-10-15. - PostgreSQL 18 Documentation - Recovery Targets, Backup Verification and RewindPostgreSQL Global Development Group · reference
Read Section 19.5.6 Recovery Target, the
pg_verifybackupreference and thepg_rewindreference for recovery stopping points, manifest checks and rejoining a diverged primary.