The alert sounds six minutes after a deploy. Three people open the logs right away, one starts typing a hotfix (a quick fix sent straight to production), and nobody tells the users anything. Everyone is busy, yet nobody has decided anything.
Incident response is a structured way to handle an outage in production. You detect it, judge how bad it is and restore the service as fast as possible. Then you learn from it through a postmortem (a report written after the incident). In the Alerting & On-Call lesson, the smoke alarm called the fire brigade on duty. Now picture that brigade at the fire. The crew chief does not hold a hose: they hand out jobs and make the decisions. The fire is put out first, and its cause is investigated later. The report afterwards asks why the fire spread (old wiring, no extinguisher), not who should be punished. In this picture, the fire is the incident, and the fire brigade is the team that handles it. The crew chief is the incident commander, putting out the fire is restoring the service, and the report afterwards is the postmortem.
This lesson is about operational incidents: a service that is down or broken. Security incidents (a data leak, a hijacked account) need extra steps, which are covered in the Incident Response for Developers lesson of the Security track.
Severity: how big the impact is
The first step after an alert is to judge the severity (how serious the incident is). The severity decides who gets called and how fast:
| Level | Meaning | Example |
|---|---|---|
| SEV1 (critical) | the service is down for all or nearly all users, or data is lost | every notes-api request fails |
| SEV2 (major) | an important function is broken or slow for some users | 30% of users cannot log in, the rest are fine |
| SEV3 (minor) | annoying, but there is a workaround | PDF export fails for big attachments |
| SEV4 (low) | cosmetic, handled during normal working hours | an icon 2 pixels off |
When in doubt, pick the more serious one. Lowering a severity is cheap, while calling people too late is expensive.
Four phases: detect, triage, mitigate, resolve
This is the incident in the Lab, Tuesday 13 October 2026, if you pick the fastest option at every step:
| Time | Phase | Event |
|---|---|---|
| 19:00 | deploy of v1.9.0 (the note tags feature) | |
| 19:03 | the connection pool (the set of database connections) runs dry, 80% of requests fail after waiting 5 seconds | |
| 19:06 | detect | alert NotesApiHighErrorRate fires, the on-call (Rani) is paged |
| 19:08 | triage | Rani acks (says she is handling it) and opens Grafana: error rate 80% |
| 19:09 | triage | Rani declares SEV1 and becomes incident commander |
| 19:10 | mitigate | decision: roll back to v1.8.0 |
| 19:15 | mitigate | v1.8.0 is running, errors drop to 0.2% |
| 19:30 | resolve | stable for 15 minutes, the incident is closed |
- Detect: the problem becomes known, ideally from an alert (the Grafana & Prometheus Setup lesson), not from users complaining. Here the alert fires 3 minutes after the impact began.
- Triage: set the severity and name an incident commander (the person who leads the response). Then open a war room, the place where everyone handling the incident meets: the
#inc-notes-1013channel or a video call. - Mitigate: restore the service as fast as possible.
- Resolve: make sure the service really recovered, watch it for a while so the problem does not come back, then close the incident.
The impact lasted 12 minutes (19:03 to 19:15). That evening notes-api served 1,000 requests a minute, and 80% failed, so about 9,600 requests failed. For the error budget, this example assumes that traffic lasts a full 30 days: 43.2 million requests, far more than the month in the Site Reliability Engineering lesson. With a 99.9% SLO, 43,200 of them may fail (the error budget). The 9,600 failed requests are 22.2% of the 30-day error budget.
Roles: incident commander, comms, ops
In a SEV1, one person doing everything is sure to be overwhelmed. So the roles are split:
- Incident commander (IC), Rani: leads, hands out jobs and makes the decisions, such as "roll back now". The IC does not debug, so they always see the big picture.
- Comms, Dimas: updates the status page (the page that tells users how the service is doing), and keeps other teams and customer support informed, regularly, even when there is no news.
- Ops (the subject matter expert, the person who knows the technical part best), Bayu: runs the technical commands, such as the rollback, and investigates.
One of them also writes down the timeline (the order of events) with times, because memory in the middle of an incident cannot be trusted.
Status page: honest, regular updates
Users whose app is failing want to know three things: whether the team knows, whether the team is working on it, and when it will be fixed. A status page such as status.notes.example.com answers with the four update statuses commonly used:
| Time | Status | Text |
|---|---|---|
| 19:10 | Investigating | We are investigating an outage: notes fail to load and save for most users. |
| 19:11 | Identified | The problem comes from the 19:00 release. We are rolling back to the previous version. |
| 19:16 | Monitoring | A fix is in place and the service is back to normal. We keep monitoring. |
| 19:30 | Resolved | This incident is resolved. Notes load and save as usual since 19:15. |
The status page also shows a status for each component (part of the service), and that status follows the severity: SEV1 here means Major outage, not "Degraded performance". Writing a smaller impact than the real one makes users angrier. While the incident runs, post an update every 30 minutes, even if it only says "still investigating".
Mitigate first, root cause later
In the mitigate phase the priority is restoring the service, not finding the root cause (the source of the problem). The problem appeared right after a deploy, so the fastest way is to roll back to v1.8.0. The cause is investigated once the service is back. The Lab calculates three choices, starting at 19:10:
| Choice | Recovered | Impact | Failed requests | Error budget |
|---|---|---|---|---|
| roll back to v1.8.0 | 19:15 | 12 minutes | 9,600 | 22.2% |
| restart the container, then roll back | 19:20 | 14 minutes | 11,200 | 25.9% |
| find the root cause first, then hotfix | 19:51 | 48 minutes | 38,400 | 88.9% |
A restart only delays the problem: the service recovers at 19:11, but the bug is still there, so the pool runs dry again at 19:14. The rollback after that restores the service at 19:20. The impact is 14 minutes: 19:03 to 19:20, minus the 3 minutes when the service was briefly back. There are other common mitigations: switch the feature off with a feature flag (the Feature Flags & Gradual Rollouts lesson), add capacity (scale up), or move to a standby server (failover). A rollback does not delete the bug from the repo, so the fix can still be done calmly the next day. If the ack only happens after users report the problem (at 19:21 instead of 19:08), the impact grows to 25 minutes, with the same rollback.
A blameless postmortem
Within a few working days, while memories are fresh (here Thursday, 15 October), the team writes a postmortem. Here is the postmortem, with the sections commonly used:
# Postmortem: notes failed to load and save
Date: Tuesday, 13 October 2026
Severity: SEV1, 12 minutes of impact (19:03 to 19:15), ~9,600 failed requests
Incident commander: Rani · Comms: Dimas · Ops: Bayu
## Timeline
- 19:00 v1.9.0 deploys through the pipeline
- 19:03 The connection pool runs dry, 80% of requests fail
- ... (minute by minute, from the timeline that was kept)
## Root cause
The POST /notes/:id/tags handler returns 400 without releasing its connection to the pool.
Every rejected tag leaks one connection until the pool (max 10) is empty,
then every query waits 5 seconds and fails.
## Contributing factors
- Tests only cover the success path: the failed-validation path was never tested
- v1.9.0 served 100% of traffic at once, with no canary
- There was no alert for a nearly full connection pool
## Action items
- [ ] Use pool.query() or try/finally client.release() in every handler (Bayu, 16 Oct)
- [ ] Integration test: 100 rejected tags, the pool still leaks no connection (Sari, 20 Oct)
- [ ] A 5% canary for 10 minutes on every release (Dimas, 27 Oct)
- Root cause: a mechanism the data proves, not a guess. "PostgreSQL was slow" is wrong: the error is
timeout exceeded when trying to connect(the app waited too long for a connection from the pool). So it was the pool inside the app that ran dry. - Contributing factors: why the bug was not caught before the release, and why the impact was that big.
- Action items (tasks that fix things): every item has an owner and a due date, and can be checked as done or not.
Blameless means the focus is on the system and the process, not on the person. "Bayu forgot client.release()" (the call that gives the connection back to the pool) is factually true, but changes nothing: tomorrow someone else can forget the same thing. The question is why tests, review and rollout did not stop the bug. When people are afraid of being blamed, they stop reporting mistakes, and the team loses what it learns from.
⚠️ Habits that make an incident longer, or bring it back
- Debugging in the middle of an outage. Every minute spent looking for the bug = 800 failed requests. Mitigate first, look for the root cause after the service is back.
- An IC who codes. Once the IC is busy reading logs, nobody makes decisions and nobody gives updates.
- A silent status page, or one that makes the outage sound small. "Degraded performance" while 80% of requests fail damages trust more than the outage itself.
- Action items nobody can check. "Be more careful in review" has no owner and no due date. Write a concrete change.
TL;DR: Incident response (a structured way to handle an outage in production) has four phases. Detect: the problem becomes known, ideally through an alert. Triage: set the severity (how serious it is) and name an incident commander (the person who leads the response). Mitigate: restore the service as fast as possible, such as with a rollback to the previous version, not by looking for the root cause (the source of the problem) first. Resolve: make sure it recovered, watch, then close. SEV1 is for a service down for every user or lost data. SEV2 is for an important function broken for some users (30% failing to log in is SEV2). SEV3 is for an annoyance with a workaround, and SEV4 for cosmetics. There are three roles: incident commander (leads, does not debug), comms (status page and regular updates) and ops (runs the technical commands). The status page (the page that tells users how the service is doing) moves from Investigating, Identified and Monitoring to Resolved, with an honest impact. The postmortem (the report after the incident) is written within a few working days and is blameless: focused on the system and process, not the person. It holds a timeline (the order of events), a proven root cause, contributing factors (why the bug was missed and the impact was big), and action items (tasks that fix things) with owners and due dates.
⚡ Severity first
Guess first: after a deploy, about 30% of users can't log in, while the rest are fine. Which severity (how serious it is, from SEV1, the worst, to SEV4) fits?
SEV2: an important function broken for some users. SEV1 is a service down for all or nearly all users, or data lost.
Meaning: The severity decides who gets called and how fast. When in doubt, pick the more serious one: lowering a severity is cheap, while calling people too late is expensive.
⚡ Mitigate first, root cause later
Meaning: To mitigate is to restore the service first, and the root cause (the source of the problem) is looked for once the service is back. In the Lab, the errors appeared right after the v1.9.0 deploy, so rolling back to v1.8.0 is the fastest way: the service recovered at 19:15, with 9,600 failed requests. Looking for the root cause first and then making a hotfix (a quick fix) recovers the service only at 19:51, with 38,400 failed requests.
⚡ A blameless postmortem
Write:
## Root cause
The POST /notes/:id/tags handler returns 400 without releasing its connection to the pool.
Meaning: This is the root cause in the postmortem (the report after the incident): a handler that does not release its database connection. A root cause is a mechanism the data can prove, not a guess. It is not a person's name either, because a postmortem is blameless: the focus is on the system and the process, not on the person. Every action item (a task that fixes things) has an owner and a due date, and can be checked as done or not.