Proving resilience: chaos and load
This tier has been about building defences — timeouts, retries, breakers, bulkheads, graceful degradation. Here is the uncomfortable follow-up: how do you know any of them work? Nearly every one of those mechanisms only ever runs during a failure, which means its first real execution happens at the worst possible moment unless you arrange otherwise.
Untested failure paths are broken failure paths
The code that runs when the database is unreachable has the least test coverage in your system and the most confidence attached to it. The usual outcomes when it finally executes:
- The timeout is longer than the caller's timeout, so it never actually fires.
- The fallback path has its own dependency on the thing that is down.
- The circuit breaker opens correctly and then nothing ever closes it.
- The retry has no jitter, so every client in the fleet retries in the same millisecond.
None of these are exotic. They are the default outcome of writing failure handling and never running it.
Three tools, three different questions
- Load testing asks where does it break? Push until something gives and find out which resource ran out first. The valuable result is not "it handled the target" — it is the shape of the curve past the target, and the name of the component that defines the ceiling.
- Fault injection asks does the handling work? Deliberately make a dependency slow, or failing, or returning nonsense, then check the caller behaves as designed. Latency injection finds more bugs than outright failure injection, because slow is much harder to handle than down.
- Chaos experiments ask does the whole system survive? State a hypothesis about steady state, break something real, and find out whether the hypothesis held.
How to run one without being reckless
The point is not to break production for the thrill. A defensible experiment has four parts: a written hypothesis about what should remain true, the smallest blast radius that still tests it, a stop condition agreed beforehand, and a human watching who is able to end it. Run it during working hours with the team present — the entire value is finding the surprise while everyone is awake and looking.
Start in staging to clear out the embarrassing failures, then move to production, because staging never has the traffic, the data volumes or the third parties that produce the real ones.
Load testing one endpoint and calling the result capacity. Real traffic is a mixture and it is the mixture that hurts — the cheap endpoint everyone calls competing for the same pool as the expensive one that holds a connection for eight seconds, while the nightly batch job runs. Test the blend you actually serve, background work included, or you have carefully measured a system nobody operates.
One last thing, because it is the same argument applied to the least-rehearsed procedure you own: your recovery plan is a claim until somebody has executed it. Fail over on purpose, and restore a backup on a schedule, and time both. Lesson 9.10 takes the second half of that seriously.
When this actually happened
A command from an established playbook was entered with a wrong input and removed far more servers than intended, including two subsystems it was not aimed at. The line worth reading twice: "we have not completely restarted the index subsystem or the placement subsystem in our larger regions for many years." The restart worked. It just took hours nobody had measured, which is precisely this lesson’s argument.
Going deeper
- Chaos Engineering: System Resiliency in Practice Rosenthal & Jones, 2020
The discipline stated properly — hypothesis, blast radius, stop condition — rather than as an excuse to break production.