What is chaos engineering?
In one line: Chaos engineering is deliberately injecting failures into a system in a controlled way — like killing pods or adding network delay — to find weaknesses before they cause real outages.
Why do it: distributed systems fail in surprising ways. You may think your service survives an availability zone failure or a slow database — chaos engineering tests that belief before real failures do.
The process (scientific method):
- Define steady state — what "healthy" looks like (for example error rate < 0.5%, p95 < 300 ms).
- Form a hypothesis — "if one of the three orders pods is killed, users won't notice".
- Inject a failure — kill the pod, add 500 ms latency to the database, block a dependency, stress CPU, fail an AZ.
- Observe — did the metrics stay within steady state? Did alerts fire correctly?
- Learn and fix — if something broke, fix it (add retries, timeouts, more replicas, better alerts) and run the experiment again.
Safety rules:
- Start small — in staging first, then a small part of production.
- Limit the blast radius — one pod, one service, a small percentage of traffic.
- Have a stop button — abort the experiment immediately if things go badly.
- Tell people — run during working hours with the team watching.
Tools:
- Chaos Monkey (Netflix, the original — randomly terminates instances).
- LitmusChaos, Chaos Mesh (Kubernetes).
- AWS Fault Injection Service, Azure Chaos Studio.
- Gremlin (commercial).
Game days: planned sessions where the team runs failure scenarios together and practises incident response.
Example: a team killed one of the two Redis replicas in staging. The app didn't fail over because the client library had no reconnect settings. They fixed the configuration — a future production outage avoided.
Tip for interviews: stress "controlled experiments with a hypothesis and limited blast radius" — not random breaking of production.