The idea is simple: it is better to meet a failure in a controlled experiment than during an outage. So failures are deliberately injected into the system — virtual machines are shut down, delays are added to the network, the disk is filled up — and then one watches whether the system keeps serving users and whether the on-call engineers notice what is happening.
How an experiment works
- Define a steady state — a metric that shows the system is healthy: for example, a share of successful responses above 99.9% or a median latency of no more than 200 ms.
- State a hypothesis: the steady state will hold because replication, a load balancer or an automatic restart will kick in.
- Inject a realistic failure: a server outage, a dropped connection, a delayed response from a dependency, a disk running out of space.
- Compare the metrics against the hypothesis; a divergence reveals a weak spot — fix it and repeat the experiment.
- Limit the blast radius: start with a single pod or a small share of traffic and widen the experiment only if the system coped.
Where the term comes from
The practice was born at Netflix: while moving to the AWS cloud, engineers built Chaos Monkey, and in December 2010 the company announced it in a blog post, following up with a fuller description in July 2011 — a program that randomly shuts down virtual machines in production in the middle of the working day, with on-call engineers standing by. This is how teams made sure their services survived failures without visible harm to users, and in 2012 Netflix open-sourced Chaos Monkey. Other “monkeys” of the “Simian Army” followed: Latency Monkey injected delays into service-to-service traffic, Janitor Monkey cleaned up abandoned resources, Chaos Gorilla simulated the failure of a whole availability zone. The approach was generalised in the definition and principles published at principlesofchaos.org: chaos engineering is the discipline of experimenting on a software system in order to build confidence in its ability to withstand turbulent conditions in production.
Tools
| Tool | What it injects | Who maintains |
|---|---|---|
| Chaos Monkey | randomly shuts down virtual machines | Netflix, open source |
| Chaos Mesh, Litmus | experiments in Kubernetes: pod shutdowns, network failures, disk and CPU stress | open-source community projects |
| AWS Fault Injection Service | managed fault injection into AWS resources and applications | AWS |
| toxiproxy | a proxy that injects delays and cuts connections | Shopify, open source |
Sources
the term is written from these pagesVerified 9 Nov