Skip to content
Foundations · 9 min

Incidents: what happens when something breaks

When a website breaks, a small group of people work together to get it going again. This lesson explains who they are, what the words mean, and what a good update sounds like. You need no experience to follow it.

What an incident is

An incident is a stretch of time when something is broken, or getting worse, for the people who use a service, and someone is working to put it right. It begins when somebody notices. That somebody is often a computer: a program watches the service and sends an alert when a number looks wrong, such as too many failed requests in the last five minutes.

The alert goes to the engineer who is on call. Being on call means it is your turn to respond, day or night, for a set period such as a week. Being contacted this way is called being paged.

How bad is it?

Teams label incidents by severity, so everyone knows how hard to push. The usual labels are SEV-1, SEV-2 and SEV-3. The smaller the number, the worse the incident.

  • SEV-1: most users cannot do the main thing the service is for. Nobody can pay, or nobody can log in. People are woken up.
  • SEV-2: an important part is broken or slow for many users, but there is a way round it.
  • SEV-3: a small part is broken for a few users. It can wait for working hours.
Every company draws the lines differentlySome use P1 to P4 instead, or have four or five levels. In an interview, say what you would count as the most serious level and why. The reasoning is what is being listened for, not the label.

Who does what

In a small incident one person does everything. In a large one the work is split into roles, so that nobody is trying to fix the problem and answer questions at the same time.

  • Incident commander: in charge. Decides what happens next and who does it. Does not type commands.
  • Operations lead: the person, or people, actually investigating and making changes.
  • Communications lead: tells everyone else what is going on, at regular times, so the people fixing it are not interrupted.
  • Scribe: writes down what was seen and done, with the time. This becomes the record afterwards.

Stop the harm first

The first aim is not to understand the problem. It is to stop it hurting users. Doing that is called mitigation. Finding the underlying reason, the root cause, comes second and can take days.

Think of a burst pipe. You turn the water off at the main first. Working out why the pipe burst is a job for later, when the floor is dry. Common ways to turn the water off:

  • Roll back: go back to the version that was running before the last change. Most incidents begin with a change.
  • Send traffic elsewhere: stop sending requests to the broken server and let the healthy ones take them.
  • Turn a feature off: switch off the part that is failing so the rest keeps working.
  • Add capacity: start more servers if the service is simply overloaded.
Do no further harmBefore any action, ask what happens if it goes wrong. Restarting a program throws away the evidence in its memory. Deleting files cannot be undone. Prefer the action you can reverse, and say out loud that you checked.

A good update

People outside the incident need to know four things. A good update gives all four in a few lines, and is sent on a schedule even when nothing has changed.

  • Impact: who is affected and how. "About 4 in 100 checkouts are failing."
  • What we think: the current best guess, stated as a guess. "We suspect one server has a full disk."
  • What we are doing: the next step. "We are taking that server out of use."
  • Next update: a time. "Next update at 22:30."
Linked exercise · needs a computer · 14 minDisk full on a log-heavy nodeRead it here, do it on a computer

Afterwards

When the service is healthy again, the team writes a review, often called a postmortem. It records what happened and when, what made it possible, and what will change. A good review is blameless: it asks what about the system let a reasonable person make that mistake, not who made it. People who expect to be blamed stop telling the truth, and then nothing gets fixed.

The idea of splitting an emergency into named roles under one commander comes from the Incident Command System used by fire services. Its use for software, and the blameless review, are described in Site Reliability Engineering (O'Reilly, 2016), edited by Beyer, Jones, Petoff and Murphy, chapters 14 and 15.