Chaos Engineering
Run controlled experiments that inject failure into systems to find weaknesses before real incidents do.
Advanced · about 4 hours · difficulty 4/5
Learn first: Capacity Planning, High Availability and Disaster Recovery
Chaos engineering is the discipline of experimenting on a system to build confidence that it can withstand turbulent conditions. It is not random breakage: it is the scientific method applied to resilience.
The experiment loop
- Define steady state with metrics (request success rate, latency, orders per minute).
- Form a hypothesis: "If one pod of the payment service dies, success rate stays above 99.9%."
- Inject a realistic fault: kill an instance, add latency, drop packets, fill a disk, block a dependency, fail a zone.
- Observe and compare against steady state.
- Learn and fix, then repeat, ideally automated.
Keep it safe
- Start in staging, then move to production with a tiny blast radius (one pod, a small traffic slice).
- Have an abort switch and monitoring in place first.
- Tell the on-call team, and do not run experiments during incidents or peak events.
Tools
- Chaos Mesh and LitmusChaos for Kubernetes (pod kill, network chaos, stress).
- AWS Fault Injection Service and Azure Chaos Studio for cloud resources.
- Toxiproxy for injecting latency and failures between services in tests.
- Game days: scheduled team exercises that combine experiments with incident practice.
What you usually find
Missing timeouts, retries that amplify load, alerts that never fire, runbooks that are out of date, and hidden single points of failure.
Good enough to move on: you can write a hypothesis-driven experiment, run it with Chaos Mesh or a cloud fault injection service with a small blast radius, and turn a finding into a fix.
Key concepts
- Steady state and hypotheses
- Fault types: kill, latency, partition
- Blast radius and abort conditions
- Chaos Mesh and LitmusChaos
- Cloud fault injection services
- Game days
Mini project
Install Chaos Mesh on your local cluster, hypothesise that your app tolerates one pod dying and 200 ms of added latency to its database, run both experiments while watching your SLO dashboard, and fix whatever breaks.
Check yourself
What must be in place before you run a chaos experiment in production, and how do you limit the damage if the hypothesis is wrong?
Free resources
- Principles of Chaos Engineering (principlesofchaos.org)
- Chaos Mesh documentation (Chaos Mesh)
- LitmusChaos documentation (LitmusChaos)