Leer en español · Lire en français · Auf Deutsch lesen
Section 9.8 of 9.8 · Intermediate · 25 min read
Chaos engineering, incidents and blameless learning
Video lesson
4 min · narrated, with captionsListen only (audio)
Read the transcript
Welcome to Section nine point eight, the last section of this chapter. Everything so far is a promise: timeouts will fire, breakers will open, alerts will reach someone. This lesson is about turning those promises into evidence.
Fire brigades don't wait for a real fire to find out whether the hoses work. They run drills. They start small, controlled fires to practise. When a real fire comes, they follow a clear plan, with named roles. And after every fire, they sit down together to work out what happened, without hunting for someone to blame, so the next one goes better. Software teams do the same.
Chaos engineering grew out of Netflix's move to the cloud, where instances could disappear at any time. Its Chaos Monkey tool randomly terminated production instances during business hours, when engineers were at their desks to notice. The word that matters in the definition is experimenting. It's not breaking things at random to see what happens. It's the scientific method applied to resilience.
Start with a steady state: a measurable sign of normal behaviour, such as orders placed per minute, rather than CPU. Then state a hypothesis: that this measure will stay within bounds while the failure is injected. Inject a real-world event, such as a slow dependency or a dying instance, with a small blast radius. Observe the experiment against a control group, and learn: fix what broke, or widen the radius. Then automate it, because systems change daily. If a guardrail is breached, the experiment aborts and rolls back automatically. That teaches something too.
Here's an experiment. The order service calls the menu service with a three hundred millisecond timeout, falling back to cached prices. The hypothesis: if those calls slow down by two seconds, the timeout and fallback absorb it. The blast radius is one instance in twenty, about five per cent of order traffic, for fifteen minutes on a weekday afternoon. It aborts automatically if that instance's success ratio falls below ninety nine per cent. With forty orders a second, each holding a thread for nought point two seconds plus the timeout, Little's law predicts twenty busy threads out of fifty. But the success ratio fell to ninety seven per cent within three minutes, and the abort fired. Traces showed the real timeout was three seconds: a library default had overridden the intended setting. Calls waited two seconds, so eighty eight threads were needed, and only fifty exist. The design was right. The configuration was not. Experiments test what is deployed, not what is documented. The team fixed the setting, added a build check, and will widen the experiment to a whole zone.
Game days rehearse bigger failures with the whole team. When a real incident happens, the central idea is separate roles. The incident commander coordinates and decides, and deliberately does not debug. The operations lead and responders diagnose and mitigate. The communications lead is the single voice to everyone outside: the status page for customers, and executives and support. And a scribe records the timeline and decisions, which feed the review afterwards. Declare incidents early, define severity by user impact, and mitigate before diagnosing: roll back, fail over or shed load first, and find out why later.
Then comes the most valuable part: learning. If engineers expect punishment, they stop giving full accounts, and the organisation loses exactly the information it needs. So reviews look for the second story: why the wrong command was so easy to run. Serious failures in complex systems need several flaws to line up. A chain of whys that ends at human error has stopped too early. Mean time to recovery, or MTTR, is a weak measure across many incidents, because a few very long ones dominate it. Impact on SLOs and completed system changes are better guides. And the strongest actions remove the hazard or add a guardrail. Be more careful is not an action item.
That completes Chapter 9. When you're ready, take the optional chapter test: twenty multiple-choice questions and two written answers, with a pass mark of eighty per cent. Then continue to Chapter 10, on cloud-native and infrastructure architecture. See you there.
What you need to know
- Chaos engineering, which grew from Netflix's Chaos Monkey (described in 2011), experiments on a system to build confidence that it withstands turbulent conditions; it is a controlled test of a hypothesis, not random breakage.
- The Principles of Chaos Engineering are: a hypothesis about steady-state behaviour, real-world events, experiments in production, continuous automation and a minimal blast radius with abort conditions.
- Game days rehearse significant failures with the whole team and test people, access, runbooks, backups and communication as well as software.
- Incident management separates roles: an incident commander who coordinates rather than debugs, operations responders, a communications lead who owns the status page and a scribe; severity levels are defined by user impact, and mitigation comes before diagnosis.
- Blameless post-incident reviews (Google SRE book; John Allspaw, 2012) seek second stories and several contributing factors rather than a single root cause or human error.
- MTTR across many incidents is a misleading metric because durations are highly skewed; SLO impact, recurring themes and completed system changes are better guides.
- Strong action items remove hazards or add guardrails, have owners and due dates, and are prioritised through the error budget policy; reminders to be careful change nothing.
Practising failure on purpose
Everything in this chapter so far is a promise about how the system will behave when something goes wrong: timeouts will fire, circuit breakers will open, load will be shed, replicas will take over, alerts will reach someone who knows what to do. Chapter 2 warned that failover which has never been exercised often fails when it is finally needed (Section 2.5). This section is about turning those promises into evidence, and about how organisations respond to, and learn from, the failures that happen anyway.
Two practices belong together. Before failures, chaos engineering and game days deliberately cause small, controlled failures to find weaknesses and to train people. After failures, incident management limits the damage and blameless post-incident reviews turn each incident into lasting improvement. Both rest on the same belief: complex systems are always partly broken, and resilience comes from finding out how, early and safely.
Chaos engineering
Chaos engineering grew out of Netflix's migration from its own data centres to Amazon Web Services, which began after a serious database corruption in 2008. Individual cloud instances could disappear at any time, so Netflix built Chaos Monkey, a tool that randomly terminated production instances during business hours, when engineers were at their desks to notice and fix any resulting problem. Netflix described it, with a family of related tools called the Simian Army, in a July 2011 blog post. Later tools went further: Chaos Kong simulated the loss of an entire AWS region by evacuating traffic from it.
Netflix engineers and others later wrote down the discipline as the Principles of Chaos Engineering (principlesofchaos.org, last revised in 2019), which define it as experimenting on a system to build confidence in its capability to withstand turbulent conditions in production. The word that matters is experimenting: chaos engineering is not breaking things at random to see what happens, but the scientific method applied to resilience. The principles list five practices:
Build a hypothesis around steady-state behaviour. Choose a measurable output that indicates normal operation, such as orders placed per minute or the checkout SLI, rather than internal metrics like CPU. The steady-state hypothesis predicts that this output will stay within bounds while the failure is injected. Vary real-world events. Inject the failures that actually happen: instances dying, a dependency slowing down, packet loss, a full disk, an expired certificate, clock skew, a spike in traffic. Run experiments in production. Only production has the real traffic, data and configuration. Automate experiments to run continuously. A one-off experiment proves resilience once; systems change daily. Minimise the blast radius. Start with the smallest experiment that can teach something (one instance, a small percentage of traffic) and keep an abort switch ready.
The chaos experiment loop
Running experiments in production is the most debated principle. Its defenders argue that staging environments differ in traffic, data, scale and configuration, so only production experiments reveal real weaknesses, and that a small, controlled experiment at 15:00 is far kinder to users than the same failure arriving uncontrolled at 03:00. Critics point out that many organisations lack the observability, automation and organisational trust to do this safely. The practical consensus is a progression: begin in a staging environment, then run in production with a tiny blast radius and automatic abort conditions tied to SLOs, and widen only as confidence grows. Never start with a system you already know is fragile; fix the known weaknesses first, because an experiment whose outcome you can predict teaches nothing.
Tooling is now widely available: cloud providers offer managed fault injection (AWS Fault Injection Service, Azure Chaos Studio), Chaos Mesh and LitmusChaos are open-source CNCF projects for Kubernetes, and commercial platforms such as Gremlin provide libraries of attacks with safety controls. Service meshes and proxies can inject latency and errors into a percentage of calls without touching application code. The tools are the easy part; the hard part is choosing meaningful hypotheses and acting on the results.
Worked example
Worked example: a latency experiment on the order service
The food-delivery order service calls the menu service to confirm item prices. The design (following Section 9.4) says the call has a 300 ms timeout and falls back to cached prices. Each order-service instance has 50 worker threads and receives about 40 orders per second, each normally holding a thread for 0.2 s.
| Steady state | Order success ratio at least 99.9%; checkout p99 under 800 ms; orders per minute within 5% of the same minute last week |
|---|---|
| Hypothesis | If menu-service calls from one order-service instance take an extra 2,000 ms, that instance's steady-state metrics stay within bounds, because the timeout and fallback absorb the delay |
| Blast radius | 1 of 20 instances (5% of order traffic) in one region, 15:00 on a weekday, 15 minutes, the other 19 instances as the control group |
| Abort conditions | Experiment instance's success ratio below 99% for 2 minutes, or the regional checkout SLO burn rate above 14.4: stop automatically |
| Expected thread use | With the 300 ms timeout: 40/s × (0.2 + 0.3) s = 20 busy threads out of 50 |
| What happened | Success ratio fell to 97% within 3 minutes and the abort fired. Traces showed calls waiting 2.0 s: the timeout was really 3,000 ms, a library default that overrode the intended setting |
| Why it failed | 40/s × (0.2 + 2.0) s = 88 threads needed, but only 50 exist: requests queued and timed out at the gateway |
| Actions | Set the timeout in the shared client configuration, add an automated test that fails the build if any outbound call lacks an explicit timeout, rerun the experiment, then widen to a whole zone |
The experiment found, at 5% of one region's traffic and in 3 minutes, a weakness that a real menu-service slowdown at lunchtime would have turned into a regional outage.
The design was right; the configuration was not. Experiments test what is deployed, not what is documented.
Game days
A game day is a planned exercise in which a team deliberately causes or simulates a significant failure and practises responding to it. Jesse Robbins popularised the practice at Amazon, where his job title was reported as Master of Disaster. Google runs large Disaster Recovery Testing (DiRT) exercises, and its SRE book describes the Wheel of Misfortune, a role-play in which on-call engineers work through a past incident while a game master reveals what the monitoring would have shown.
Game days test more than software. They test whether alerts reach the right people, whether people have the access they need at 03:00, whether runbooks are current, whether the failover procedure actually works, whether backups restore, and whether the communications plan reaches customers. A typical food-delivery game day might fail over the order database to its standby during a quiet afternoon, with the whole on-call rotation watching, a facilitator injecting surprises (the person who knows the runbook is on leave
) and an observer noting every delay and confusion for the review afterwards. Before a big ticket on-sale, the same team might rehearse losing the payment provider and switching to the backup provider mid-sale.
Incident management
An incident is an unplanned event that disrupts, or threatens to disrupt, a service and needs a coordinated response. Incident management is the practice of running that response so that it is fast, calm and well communicated. Most modern practice borrows from the Incident Command System, developed for wildfire response in California in the 1970s, and adapted for software in the Google SRE book's chapter on managing incidents.
The central idea is separation of roles. The incident commander owns the incident: sets priorities, assigns roles, makes decisions and keeps the overview, and deliberately does not debug, because a commander buried in a log file is not commanding. The operations lead and responders diagnose and mitigate. The communications lead is the single voice to everyone outside the response: support teams, executives and customers through the status page, with updates at a promised cadence even when there is nothing new. A scribe records the timeline, decisions and hypotheses. In a small company one person may hold several roles, but the roles should still be named. Roles are handed over explicitly when shifts change.
Incident roles
Several habits make the difference. Declare incidents early and cheaply: it is better to stand down a false alarm than to discover an hour in that three teams have been debugging the same problem separately. Classify each incident with a severity level defined by user impact, not by cause, so that everyone knows who to call and how widely to communicate. Mitigate before diagnosing: roll back the last deployment, fail over, switch off the feature flag or shed load first, and find out why later. Use one incident channel. And remember external obligations: a personal-data breach may have to be reported to the regulator within 72 hours under the GDPR, which is why security incidents follow the related process in Section 8.8.
Illustrative severity levels for the food-delivery platform
| Level | Example impact | Response | Communication |
|---|---|---|---|
| SEV1 (critical) | Ordering or payment unavailable for most users in a region; suspected data breach | Page immediately; incident commander and communications lead assigned at once | Status page within 15 minutes; updates every 30 minutes; executives informed |
| SEV2 (major) | A key journey badly degraded for many users, such as checkout p99 above 4 s in one city; fast SLO burn | Page the on-call engineer; commander assigned | Status page if customers can notice; internal updates hourly |
| SEV3 (minor) | Partial degradation with a workaround; an internal tool down | Handled in working hours by the owning team | Team channel; ticket |
| SEV4 (low) | Cosmetic issue or a near miss with no user impact | Backlog item | Optional review if it teaches something |
Blameless post-incident reviews
After the incident comes the most valuable part: learning. A post-incident review (often called a postmortem) reconstructs what happened, why it made sense to the people involved at the time and what will change. The Google SRE book's chapter on postmortem culture sets out the expectations: a written record for every significant incident, covering impact, timeline, contributing causes and follow-up actions, reviewed and shared, and written without blame.
John Allspaw's 2012 post Blameless PostMortems and a Just Culture
, written when he led technical operations at Etsy, explains why blamelessness is practical rather than merely kind. Engineers who expect punishment stop giving full accounts of what they saw and did, so the organisation loses exactly the information it needs to prevent the next incident. Allspaw draws on safety science, including Sidney Dekker's work on just culture, and on the idea of second stories: the first story says an engineer ran the wrong command
; the second asks why the command was easy to run, why the tool did not warn, why the procedure seemed reasonable under time pressure, and finds conditions that will trap the next person too. Blameless does not mean unaccountable: people are still expected to give a full account, and the organisation is accountable for fixing the conditions.
Good reviews avoid hindsight bias (the outcome was not obvious at the time), counterfactuals (should have
, failed to
) and the search for a single root cause. Richard Cook's short paper How Complex Systems Fail
(1998) argues that serious failures in complex systems need several flaws to line up, so there is no single root cause, only contributing factors. A five-whys chain that ends at human error
has stopped too early. Note also what went right: the expertise and improvisation that limited the damage are part of how the system really stays up, and they are invisible unless someone records them.
Learning from incidents, and the limits of MTTR
Organisations naturally want a number to show whether incident response is improving, and mean time to recovery (MTTR) is the usual candidate. Chapter 2 used MTTR in A = MTBF / (MTBF + MTTR), where it is meaningful for a single component with repeatable failures. As an organisational metric across many different incidents it is much weaker. Incident durations are highly skewed: most are short and a few are very long, so the mean is dominated by a handful of outliers. Courtney Nash's analyses of thousands of public incident reports in the Verica Open Incident Database (VOID reports from 2021 onwards) found exactly this skew, and a 2021 Google report by Štěpán Davidovič, Incident Metrics in SRE, used simulations to show that, with realistic numbers of incidents, changes in MTTR are mostly noise and cannot reliably show whether an improvement worked.
Better signals are the impact on SLOs and error budgets (which weight incidents by what users felt), recurring themes across reviews (the same kind of configuration change causing trouble three times), near misses, how quickly incidents are detected, how often reviews lead to completed system changes, and qualitative evidence such as whether engineers find reviews useful. Many organisations publish reviews internally in a searchable library and hold regular incident review meetings, so that one team's lesson reaches others.
Action items that actually change the system
A review is worth only the changes it produces. Actions differ greatly in strength. Strongest are those that remove the hazard (delete the dangerous command, make the unsafe state impossible), then guardrails that stop the mistake propagating (validation of configuration, staged rollouts and canaries, rate limits on changes, automatic rollback on SLO burn), then faster detection and mitigation (a new SLO alert, a tested runbook, an automated failover). Weakest are training, documentation and reminders. Be more careful
is not an action item; it changes nothing about the conditions that will meet the next person.
Each action needs an owner, a priority and a due date, and must live in the team's normal backlog rather than in a forgotten document. The error budget policy from Section 9.5 provides the leverage: an incident that consumed a large share of the budget earns its fixes priority over features. Keep the list short; five completed actions beat twenty open ones. Where an action changes the architecture, such as adding a bulkhead or removing a synchronous dependency, record it in an architecture decision record that cites the incident, and link the relevant runbooks from the alerts that will fire next time.
Checklist: running a post-incident review
Use this for every incident above an agreed severity, for every incident that spends more than a set share of an error budget, and for interesting near misses.
- Schedule it within a few working daysMemories fade fast; logs and chat history may expire. Book the people involved, a facilitator who was not involved, and the owners of affected services.
- Build the timeline from evidence firstAssemble alerts, deployments, chat messages, dashboards and traces into a timeline before the meeting, so the discussion starts from facts rather than recollection.
- State the impact in user termsWho was affected, how many, for how long, which SLOs and how much error budget; include money, data and regulatory exposure where relevant.
- Set the blameless frame explicitlyOpen by saying that the goal is to understand how the system and the work really happen, and that nobody will be punished for describing what they did and why.
- Ask how it made sense at the timeFor each key decision, ask what the person knew, what they were trying to do and what the tools showed them. Avoid counterfactuals such as 'should have' and 'failed to'.
- Look for several contributing factorsTechnical, organisational and procedural conditions together; resist stopping at the first single 'root cause' or at human error.
- Note what went wellRecord the adaptations, expertise and luck that limited the damage; they are part of how the system really stays up.
- Agree a few actions that change the systemPrefer removing hazards and adding guardrails over training and reminders; give each action an owner, a priority and a due date, and track it in the normal backlog.
- Publish and shareWrite the review up in a standard template, share it widely, add it to a searchable library and revisit open actions at a regular review meeting.
Check your understanding
Why does a chaos experiment need a steady-state hypothesis rather than simply 'see what breaks'?
Because a measurable prediction about normal user-facing behaviour tells you whether the system coped, gives abort conditions and turns the exercise into evidence rather than an anecdote.
Why should the incident commander avoid debugging?
Because the role is coordination: priorities, roles, decisions and overview. A commander absorbed in technical detail leaves nobody steering the response.
What is a 'second story' in a post-incident review?
The account that goes beyond who made a mistake to the conditions, tools, pressures and design that made the action seem reasonable and will trap the next person too.
Why is average MTTR across a year of incidents a weak measure of improvement?
Incident durations are highly skewed, so a few long incidents dominate the mean, and with realistic incident counts changes in it are mostly noise.
Sources and further reading
Have a question about this section? ArchitectBot, the course’s AI study assistant, answers from the course first.
Ask: “We had a two-hour checkout outage last week. How do I run a post-incident review that leads to real fixes rather than blame?”