Chaos engineering

Hypothesis → steady-state metric → minimal blast radius → abort condition. Kill dependencies, inject latency, partition networks — in that order of ambition.

About 27 min read3-question knowledge check

The mental model

A fire drill is not an arsonist setting the building alight to see what happens. It's a controlled exercise with a hypothesis ("people can evacuate in under 4 minutes"), a bounded scope (one building, announced, with marshals watching), and a stop condition (if someone's actually hurt, the drill ends). The value isn't the fire — it's discovering, on your terms, that the third-floor exit is blocked before a real fire finds it for you.

Chaos engineering is fire drills for distributed systems. The name misleads people into thinking it's "randomly break things in production and see what happens" — reckless cowboy stuff. It is the *opposite*: it's a disciplined, hypothesis-driven experiment to find weaknesses before they cause outages. The formal definition from the Principles of Chaos Engineering is "the discipline of experimenting on a system in order to build confidence in the system's capability to withstand turbulent conditions in production." The load-bearing word is experiment — with a hypothesis, a control, a measured outcome, and a way to stop.

The reason it exists: distributed systems fail in ways you cannot predict by reading the code. Retry storms, cascading timeouts, gray failures, thundering herds after a dependency blip — these are emergent behaviours that only appear when real components interact under real conditions. You can't unit-test them into existence. The only way to know whether your system actually survives a Redis outage is to take Redis away and watch — but on your terms, with a hypothesis and a stop button, not at 3am when a real Redis dies.

The four pillars of a disciplined experiment, in order — and the order matters:

  • Hypothesis — a falsifiable prediction: "if Redis dies, checkout success stays above 99% via the fallback path." Not "let's see what happens."
  • Steady-state metric — the measurable definition of "the system is healthy" that you watch throughout (checkout success rate, not CPU).
  • Minimal blast radius — the smallest scope that can still test the hypothesis (one instance, 1% of traffic), so a wrong hypothesis costs little.
  • Abort condition — a pre-agreed threshold on the steady-state metric that stops the experiment instantly if reality disagrees with the hypothesis.
The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision