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. It is not "breaking things in prod"; it is a scientific experiment to verify resilience hypotheses.
Never start with a "Chaos Monkey" that kills random production nodes. Use the Blast Radius progression:
| Target | Fault | Hypothesis |
|---|---|---|
| Network | Latency Injection | "The circuit breaker will trip and fall back to cache." |
| Storage | Disk Full | "The application will gracefully degrade to read-only mode." |
| Compute | CPU Hog / OOM | "The load balancer will health-check the node out of rotation." |
| DNS | Resolve Failure | "The secondary DNS provider will take over automatically." |
For teams on K8s, Chaos Mesh is the industry standard. It allows you to inject faults via CRDs (Custom Resource Definitions) without changing application code.
# Example: Network latency injection
apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
metadata:
name: network-delay
spec:
action: delay
mode: one
selector:
namespaces:
- default
labelSelectors:
'app': 'my-web-app'
delay:
latency: '200ms'
jitter: '50ms'
duration: '5m'
A Game Day is a scheduled 2-4 hour window where the engineering team runs a series of chaos experiments.
If you inject a fault and your dashboards don't show any change—but your users are complaining on Twitter—you have a Blind Spot. Chaos Engineering is as much about testing your monitoring as it is about testing your code.