TExcelTAD
Home › Site Reliability Engineering: SLOs, Incidents & Chaos › Chaos Engineering & Game Days

Chaos Engineering & Game Days

Everything in this course so far assumes the system will behave as designed when parts of it fail: the breaker opens, the retries back off, the load balancer routes around the dead pod, the runbook works. Chaos engineering checks those assumptions by causing failures on purpose, in a controlled way, and watching what happens. Netflix popularised it with Chaos Monkey (randomly terminating instances in production) in 2011; the discipline is summarised at principlesofchaos.org.

The method

A chaos experiment is a small scientific experiment:

  1. Define the steady state as a measurable output that shows the system works: the SLIs (checkout success ratio, p99 latency), not internal metrics.
  2. Hypothesise that the steady state continues during the failure: "when one of four checkout pods is killed, the success ratio stays above 99.9% and p99 stays under 800 ms".
  3. Inject a realistic failure: kill a pod, add 300 ms of latency to the database, drop 5% of packets to the payment provider, fill a disk, expire a certificate, fail a zone.
  4. Watch for a difference between the experiment and the steady state (or a control group).
  5. Minimise the blast radius: start in staging, then a small share of production traffic; define abort conditions that stop the experiment automatically.
  6. Learn and fix: a disproved hypothesis is a success; it found a weakness before a real incident did.

An experiment with an abort condition

The model runs a checkout service of 4 pods at 80 requests per second (each pod handles up to 30). The experiment kills pods at second 60 and observes the per-second error ratio, aborting (and restoring the pods) if the error ratio over the last 30 seconds exceeds 5%. Three variants: one pod killed; two pods killed; and one pod killed when the readiness probe is misconfigured, so the load balancer keeps sending traffic to the dead pod for 30 seconds:

python · try it yourself
PODS, PER_POD, RPS = 4, 30, 80

def experiment(name, kill, lb_delay=0, abort_ratio=0.05, seconds=180):
    errors_log, aborted_at = [], None
    for s in range(seconds):
        killed = kill if 60 <= s and aborted_at is None else 0
        alive = PODS - killed
        # the load balancer still routes to dead pods until it notices (readiness/health checks)
        routed_to_dead = killed if s < 60 + lb_delay else 0
        share_dead = routed_to_dead / (alive + routed_to_dead)
        to_alive = RPS * (1 - share_dead)
        served = min(to_alive, alive * PER_POD)
        errors = RPS - served
        errors_log.append(errors / RPS)
        window = errors_log[-30:]
        if aborted_at is None and s >= 60 and sum(window) / len(window) > abort_ratio:
            aborted_at = s
    during = errors_log[60:(aborted_at + 1) if aborted_at else seconds]
    bad = sum(errors_log) * RPS
    verdict = (f"ABORTED at t={aborted_at}s" if aborted_at else "hypothesis held")
    print(f"{name:<42} max error ratio {max(during):5.1%}  failed requests {bad:6.0f}  {verdict}")

experiment("kill 1 of 4 pods", kill=1)
experiment("kill 2 of 4 pods", kill=2)
experiment("kill 1 pod, LB notices after 30 s", kill=1, lb_delay=30)
kill 1 of 4 pods                           max error ratio  0.0%  failed requests      0  hypothesis held
kill 2 of 4 pods                           max error ratio 25.0%  failed requests    140  ABORTED at t=66s
kill 1 pod, LB notices after 30 s          max error ratio 25.0%  failed requests    140  ABORTED at t=66s

Killing one pod is absorbed: three pods have 90 rps of capacity for 80 rps of traffic. Killing two disproves the hypothesis immediately: the abort condition stops it within seconds, after a limited number of failed requests, and the finding is "we run without N+2 headroom". The third variant is the interesting one: capacity was sufficient, but the load balancer's slow health checking turned a routine pod loss into a quarter of requests failing, which the abort condition caught. That's a configuration bug a real pod crash would have found at 3 a.m.

Game days

A game day is a planned session where a team runs failure scenarios together, often including the human response: does the alert fire, does the page reach the on-call, does the runbook work, can the team find the cause? A plan template:

markdown
# Game day: checkout, zone failure (2026-04-14, 14:00–16:00 UTC)

**Facilitator:** M. Rossi   **Participants:** payments on-call, SRE, one observer from support
**Environment:** production, eu-west, 10% of traffic (via the canary route)   **Status page:** not needed

## Hypotheses
1. Draining zone eu-west-1a moves traffic to the other two zones within 60 s; checkout SLI stays above 99.9%.
2. The CheckoutErrorBudgetBurn alert does NOT page (the burn stays below 14.4x).
3. The runbook "ZoneEvacuation" can be followed by someone who hasn't used it before.

## Abort conditions (any one ends the exercise and restores the zone)
- checkout error ratio above 1% for 2 minutes (dashboard link);
- any real incident declared anywhere in the company;
- the facilitator calls it.

## Steps
| Time | Action | Owner | Expected |
|---|---|---|---|
| 14:00 | announce start in #ops and #payments | facilitator | |
| 14:10 | cordon and drain eu-west-1a nodes | S. Park (following the runbook) | pods rescheduled within 3 min |
| 14:30 | observe SLIs, alerts, autoscaler | all | see hypotheses |
| 15:00 | uncordon, verify balance | S. Park | traffic even across zones within 10 min |
| 15:30 | debrief: what surprised us? | facilitator | action items filed |

Write the results up like a postmortem: hypotheses held or not, surprises, action items. Some teams practise incident response only (the "Wheel of Misfortune"): the facilitator replays a past incident from its timeline and a volunteer works through it as on-call, with no system actually broken.

Getting started safely

  • Start with known weak spots and in staging; graduate to production once experiments are routine.
  • Make abort conditions automatic and test the abort itself.
  • Announce experiments, and never run them during a real incident or a freeze.
  • Prefer small, frequent, automated experiments over rare big-bang ones: a weekly scheduled pod-kill in staging catches regressions in readiness probes and retry settings early.

Tools such as Chaos Mesh and LitmusChaos run these experiments on Kubernetes (next lesson).

Test yourself

What should a chaos experiment's steady state be based on?

  1. CPU usage
  2. User-facing SLIs such as success ratio and latency
  3. The number of pods
  4. Log volume

In the model, why did killing one pod fail the experiment when the load balancer noticed only after 30 s?

  1. Capacity was insufficient
  2. Traffic kept going to the dead pod, so about a quarter of requests failed although the remaining pods had enough capacity
  3. The abort condition was wrong
  4. Two pods were killed

An experiment disproves its hypothesis and is aborted. How should the team see it?

  1. A failure of the chaos programme
  2. A success: it found a weakness under controlled conditions before a real incident did
  3. A reason to stop chaos engineering
  4. A SEV-1