Skip to main content

Chaos Engineering & Fault Injection

Level 7: Level 7: Reliability, Resilience & Operationshard30 minchaosfault-injectionresilience

State a steady-state hypothesis, inject a realistic fault into the smallest blast radius, measure against the hypothesis, always run with an error-budget-tied auto-abort, and test in production with guardrails because staging never reproduces real conditions.

Chaos engineering is controlled experiments, not random breakage

Chaos engineering is not "randomly break things." It is the disciplined practice of running controlled experiments on a system to build confidence that it withstands turbulent real-world conditions. Every redundancy, timeout, retry, and failover you designed is a hypothesis about behavior under failure, and an untested failover is not a failover, it is a guess. Chaos engineering turns those guesses into evidence.

The method is a scientific loop

  1. Define the steady state as a measurable output that means "the system is healthy," typically a business or SLI metric like successful checkouts per second or playback-start rate, not an internal metric like CPU.
  2. Form a hypothesis: "if we inject fault X, the steady-state metric stays within tolerance because failover/degradation Y handles it."
  3. Inject a real-world fault into a controlled slice.
  4. Measure the steady-state metric against the hypothesis.
  5. Learn: either you gained confidence, or you found a weakness to fix before it finds you at 3 a.m.

Fault types map to real failures: added latency (a slow dependency), error injection (a dependency returning 500s), instance/AZ/region termination (Chaos Monkey killing a node, an AZ going dark), resource exhaustion (CPU/memory/disk/file-descriptor pressure), and dependency loss (the cache tier or a downstream service disappearing). Each corresponds to something that will actually happen in production.

Blast radius is the safety discipline

Blast radius is the safety discipline that separates engineering from sabotage. You start with the smallest possible scope (one instance, one non-critical service, a tiny percentage of traffic, off-peak) and expand only as confidence grows. You always run with guardrails: an automatic abort condition that halts and reverts the experiment the moment a key metric crosses a threshold. That abort should be tied to the error budget, if the experiment is about to burn more budget than you can afford, it stops itself, so a chaos experiment can never cause an outage worse than your reliability target already tolerates.

Interview nuance: the strongest justification for running in production (with guardrails) rather than only staging is that staging never matches real conditions: real traffic patterns, real data volumes, real cache-hit ratios, real cross-service dependency graphs, and real autoscaler behavior only exist in prod. A failover that works in an empty staging environment routinely fails under production load. That is precisely the class of bug chaos exists to find, so you must eventually test where the risk lives, carefully.

Maturity progresses from GameDays (scheduled, human-run exercises where a team injects a fault together and watches) toward continuous automated experiments run by tooling: AWS Fault Injection Simulator (FIS), Gremlin, Chaos Mesh (Kubernetes), and Netflix's Chaos Monkey / Simian Army lineage. Automation lets you re-verify resilience on every change, so it does not silently regress.

Recap: state a steady-state hypothesis, inject a realistic fault into the smallest blast radius, measure against the hypothesis, always run with an error-budget-tied auto-abort, and test in production with guardrails because staging never reproduces real conditions.

Apply

Your turn

The task this lesson builds to.

Design a chaos experiment to validate that a service survives losing its cache tier. State the hypothesis, the blast radius, the metrics you watch, and the abort criteria.

Think about

  1. What is the steady-state-hypothesis method?
  2. Why run in production with guardrails rather than only staging?
  3. What automatic stop condition ties to the error budget?

Practice

Make it stick

A second problem on the same idea, so it survives past today.

Design a GameDay for a fintech that must prove its payments platform survives losing an entire AWS availability zone during business hours, without dropping or double-processing a single payment. State the hypothesis, blast radius controls, what you measure, and the abort plan.

Think about

  1. Why is the exactly-once reconciliation check, not just availability, the point?
  2. How do you bound risk while deliberately running during business hours?
  3. What zero-tolerance condition aborts the experiment instantly?