1. The Hypothesis-Experiment Loop
Chaos engineering isn't "randomly break things and see what happens" — done well,
it's a disciplined loop borrowed from the scientific method. Start from a specific,
falsifiable hypothesis about steady-state behavior: "if the
inventory-service primary Pod is killed, checkout-service's
p99 latency stays under 500ms because of the retry and circuit-breaking config from
Week 16." Then design the smallest experiment that could disprove it, run it against
a real (ideally production-like, and eventually production) environment, and compare
what actually happened against the hypothesis.
The order matters: define the hypothesis and the steady-state metric before running the experiment, not after — deciding what "success" looks like retroactively, once you already know the outcome, isn't a real test of anything. Every experiment should also have a defined blast radius and an automatic abort condition, so a genuinely bad outcome doesn't turn a controlled experiment into a real incident.
If every chaos experiment confirms exactly what you expected, the experiments are probably too conservative to find anything real. The valuable outcome of chaos engineering is usually the experiment that fails — it's how the team discovers a retry policy that wasn't actually wired up, or a circuit breaker threshold set too high to matter, before a real outage does.
2. Fault Injection with Chaos Mesh
Chaos Mesh is a Kubernetes-native chaos engineering platform, installed via Helm, that expresses fault injection as ordinary Kubernetes custom resources — the same CRD pattern from Week 15's Operators, applied to deliberately breaking things instead of running them.
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
name: inventory-pod-kill
spec:
action: pod-kill
mode: one # exactly one matching Pod per trigger
selector:
namespaces: [production]
labelSelectors:
app: inventory-service
scheduler:
cron: "@every 10m"
apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
metadata:
name: inventory-network-delay
spec:
action: delay
mode: all
selector:
namespaces: [production]
labelSelectors: { app: inventory-service }
delay:
latency: "300ms"
jitter: "50ms"
duration: "5m"
direction: to
target:
selector:
labelSelectors: { app: checkout-service }
mode: all
PodChaos tests the failure Weeks 11–12 designed for directly — does a
killed Pod actually get replaced and does traffic actually route around it during
the gap. NetworkChaos tests something readiness probes can't: not "is
the dependency down," but "is the dependency slow," which is what Week 16's
timeout and perTryTimeout settings were specifically
written to survive — this experiment is the direct verification that they actually
do.
A single Pod kill against one non-critical service in staging, watched closely, is the right first experiment — not a network partition across an entire production namespace. Chaos Mesh's mode: one and namespace-scoped selectors exist precisely so you can control blast radius explicitly rather than accidentally chaos-testing the whole cluster on your first attempt.
3. Game Days & Turning Findings Into Fixes
A game day is a scheduled, team-wide chaos exercise — not a solo engineer running an experiment quietly, but the whole on-call rotation from Week 21 actively responding to an injected failure as if it were real, using their actual runbooks and dashboards. The goal is as much about testing the humans and the process as it is about testing the system: does the runbook's first step actually work, does the right person get paged, does the burn-rate alert from Week 21 fire when it should.
A game day always ends the same way Week 21's incidents do — with a written report. The difference is a chaos game day's report has one extra, valuable property: because the failure was deliberately injected, the "ground truth" of what happened is known exactly, which makes it unusually easy to spot every place the runbook, the alert, or the system's actual behavior diverged from what the team expected.
Hypothesis: checkout-service p99 stays under 500ms during an
inventory-service Pod kill.
Result: PARTIALLY CONFIRMED
- p99 peaked at 640ms for ~8 seconds during Pod rescheduling. FAIL.
- Circuit breaker (Week 16) correctly ejected the failing endpoint after
5 consecutive errors, as designed. PASS.
- Burn-rate alert (Week 21) did NOT fire -- the 8-second spike was too
short to trip even the 5m window. Alert may be missing short,
high-severity spikes entirely.
Follow-ups:
1. Add a readiness probe `initialDelaySeconds` tuning pass -- new Pod
was marked Ready before its connection pool warmed up. (owner: X)
2. Add a shorter secondary burn-rate window (1m) for spike detection. (owner: Y)
3. Re-run this exact experiment after both fixes ship, to confirm.
Notice the report doesn't stop at "it mostly worked" — it surfaces a real gap (the alerting window entirely missed a genuine spike) that no amount of reading the Prometheus rule file in Week 21 would have caught, because that gap only becomes visible when a real, timed failure actually happens against it.
A follow-up action item that's implemented but never re-verified against the same original experiment is an assumption, not a confirmed fix. Item 3 in the report above — re-running the exact same chaos experiment after both fixes ship — is what actually closes the loop; without it, you've made a change you believe helps, not one you've proven does.
4. Hands-on Exercise
Run a real chaos experiment against your own service, with a written hypothesis
Install Chaos Mesh and put the full hypothesis-experiment loop into practice.
Requirements:
- Install Chaos Mesh via Helm on your local or staging cluster.
- Write a specific, falsifiable hypothesis about how your deployed app behaves under a Pod kill, including the exact metric you'll measure and the threshold that would disprove it.
- Run a
PodChaosexperiment against the app while watching your Week 13 dashboard, and record the actual observed metric. - Run a
NetworkChaoslatency-injection experiment against a dependency and confirm whether your timeout/retry config behaves as designed. - Write a short game-day-style report following the format in Section 3 — hypothesis, result, and at least one concrete follow-up finding, even if everything technically "worked."
Chaos Mesh ships a web dashboard (chaos-dashboard) that visualizes running and scheduled experiments — enable it early, it makes confirming an experiment actually ran, and cleanly stopping one mid-way, far easier than reading YAML status fields.
5. Knowledge Check
Three quick questions. Expand each to check your answer.
Q1
Why does the hypothesis and its success metric need to be defined before the experiment runs, not after?
Why does the hypothesis and its success metric need to be defined before the experiment runs, not after?
Deciding what counts as "success" after already seeing the outcome makes it trivially easy to retroactively declare any result acceptable, which defeats the purpose of testing anything. A hypothesis and its specific threshold committed to in advance is what makes the experiment a genuine test capable of actually failing — and a test that can't fail doesn't tell you anything.
Q2
What does a NetworkChaos latency-injection experiment reveal that a PodChaos kill experiment doesn't?
What does a NetworkChaos latency-injection experiment reveal that a PodChaos kill experiment doesn't?
A Pod kill tests total failure — is the dependency down, does the caller route around it. A network delay tests degraded-but-alive behavior — a dependency that's slow but still technically responding — which specifically exercises timeout and retry configuration in a way a hard kill doesn't, since a killed Pod fails fast while a slow one can silently stall a caller that has no timeout set.
Q3
Why is re-running the same chaos experiment after a fix ships part of actually closing a game day's follow-up items?
Why is re-running the same chaos experiment after a fix ships part of actually closing a game day's follow-up items?
Shipping a fix based on a hypothesis about what caused the original finding is still an assumption until it's verified. Re-running the identical experiment afterward turns "we believe this fixes it" into "we confirmed this fixes it," which is the same evidence-over-assumption principle the whole chaos engineering discipline is built on in the first place.