Overview
Curated: · Written: · Reviewed:
Chaos Engineering
In one line
Chaos engineering tests one named resilience defence by injecting a realistic fault under a written steady-state hypothesis. Reach for it where a defence exists but its behaviour under real failure is unknown.
Key definitions
- Steady state: the user-visible outcome that must hold, such as checkout p99 under 400 ms and error rate under 1%, measured on the user journey rather than host health.
- Hypothesis: a falsifiable claim, for example 'with 250 ms on fraud-check, checkout still meets steady state', stated with the observation that would disprove it.
- Blast radius: the share of traffic, pods, zones or accounts the fault can touch, capped in advance.
- Stop condition: a signal and threshold that aborts the run automatically once it has been breached for a stated duration.
- Independent abort authority: a named person other than the experiment owner who can halt the run without asking anyone.
- Recovery phase: the period after fault removal, where retry storms, backlog drain and scale oscillation appear.
Formulas and complexity
Chance that a rare defect shows up in n events at rate q:
For q = 1/500 and n = 1000, P is about 0.86. Expected hits are
How it works
- Write the hypothesis and steady-state thresholds, then confirm a clean baseline and healthy telemetry. Missing data counts as unknown, not green.
- Inject one fault at a scoped blast radius, and verify on the targets that it was applied.
- Evaluate stop conditions at each interval. On breach, abort, roll back and keep the evidence. Do not run to planned duration.
- Remove the fault and check recovery against its own expected signals.
- Record the outcome, file findings with an owner, and schedule a rerun of the same hypothesis.
When to use and when not to
| Situation | Use chaos? | Prefer instead |
|---|---|---|
| Defence exists, behaviour under failure unknown | Yes | None |
| Need to verify data recovery correctness | No | Backup restore drill |
| Staging lacks production traffic shape, state or scale | Yes, as capped canary | Staging alone |
| Unrelated incident or risky change in flight | No | Wait |
| Question is capacity under load | No | Load test |
| Killing one stateless pod to test regional failover | No | Zone or region drill |
Traps interviewers probe
- Treating a pass as proof. Fix: a green run only shows the fault did not breach this steady state at this scale. State the residual uncertainty.
- Reporting 'the controller says completed'. Fix: verify the fault reached the targets, for example 3 of 8 pods actually shaped, and that the injector did not fail first.
- Measuring host health instead of the journey. Fix: use checkout p99 and error rate on the journey, and treat missing telemetry as unknown.
- Running to planned duration after a breach. Fix: stop, roll back and preserve evidence.
- Skipping recovery. Fix: give recovery its own signals, such as queue depth falling faster than arrivals can refill it.
Interview tips
Open with: 'It is a hypothesis test on a named defence. The defence is X, the steady state is Y on the user journey, the fault is Z, and this result would falsify the belief.'
Follow-ups to expect: why not staging; how the run is stopped and who can abort it; how you know the fault was applied; what recovery looks like and what it must not do; how you scope the identity so the tool cannot reach untagged hosts.
Worked check for a rare-path defect: at 5,000 rps and 1.5% of requests using gift-card redemption, full traffic gives 75 redemptions per second. Hitting 1,000 redemptions in 30 minutes needs only about 0.56 per second. One percent of traffic gives 0.75 per second, about 1,350 in 30 minutes, so start there and widen only after the signal is clean.
30-second answer outline: hypothesis in one sentence; steady-state thresholds on the journey; scoped fault with its cap; stop condition and named abort authority; what result would falsify the hypothesis; recovery check and finding owner.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.