On-call and incident response

Intermediate · 19 min

Run a fair on-call rotation and handle an incident well: declare it, assign a commander, mitigate before you diagnose, and keep one running record.

Before thisAlerting on symptoms, not causesTeam topologies and you build it, you run it

Tech Tutorials with Piyush · 19 min

On-call and incident response

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by Tech Tutorials with PiyushReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • On-call works when it is shared, bounded and measured: a rotation of enough people, a secondary as backup, a clear handover, and a count of pages per shift that the team acts on.
  • Declare an incident early. Declaring costs little, and a quietly growing problem with no owner is how short outages become long ones.
  • Split the roles. An incident commander coordinates and decides, an operations lead makes changes, and a communications lead keeps everyone else informed.
  • Mitigate first, diagnose later. Rolling back, failing over or switching off a feature restores service, and the root cause can wait for the postmortem.
  • Keep one live incident document with a timestamped timeline. It keeps late joiners up to date and becomes the raw material for the postmortem.

The problem: the 3 a.m. scramble

The pager goes off. The engineer who answers half-remembers a runbook, starts digging in logs, and pings two colleagues. They both join and start trying fixes at the same time. Someone restarts the database while someone else is reading its logs. Customer support asks for an update in three different chats, and nobody answers, because everyone is debugging. Ninety minutes later it is fixed, and nobody can say exactly what happened when.

None of that chaos was technical. It came from having no rotation agreement, no roles and no running record. If you build it, you run it, you also need a way of running it that holds up at night. ML systems have their own wrinkles, covered in the MLOps incident response lesson. This lesson is the general version.

The rotation

A good rotation is shared, bounded and measured.

  • Shared: enough people that each is on call rarely. With six people on weekly shifts, each person is primary one week in six.
  • Backed up: a primary takes the page, and a secondary takes it if the primary doesn’t acknowledge within a few minutes, and can be pulled in to help.
  • Handed over: shifts change at a fixed time during working hours, with a short note on anything still open. Monday 10:00 is better than midnight.
  • Measured: count pages per shift. Google’s SRE book argues for at most about two incidents per 12-hour shift, because each one takes hours to handle and follow up. More than that is a signal to fix alerts or systems, not to ask people to try harder.
  • Compensated: time off or pay for out-of-hours work. Otherwise good people quietly leave the rotation.

Teams that span time zones can use follow-the-sun rotations, so nobody is on call at night.

A worked example: a rotation and its load

I wrote a short Python script to produce a six-week rotation with a primary and secondary, handing over on Monday at 10:00. It then summarizes a month of page timestamps. The pages are synthetic: 19 at random times, plus one noisy afternoon with four pages in 13 minutes.

$ python3 oncall.py
week  starts            primary  secondary
   1  Mon 02 Nov 10:00  ana      bo
   2  Mon 09 Nov 10:00  bo       chen
   3  Mon 16 Nov 10:00  chen     dee
   4  Mon 23 Nov 10:00  dee      eli
   5  Mon 30 Nov 10:00  eli      fay
   6  Mon 07 Dec 10:00  fay      ana

week  primary  pages  night(22-07)  worst 12h shift
   1  ana          5             2                2
   2  bo           7             4                1
   3  chen         7             4                4  <- over 2 per shift
   4  dee          4             2                1

Two things stand out. First, a third to a half of the pages land at night. With random times that is expected, since 9 of every 24 hours count as night, but real alerts should be checked against that baseline: if most pages come at night, look for batch jobs or backups causing them. Second, chen’s four pages in 13 minutes were almost certainly one problem raising several alerts. The fix is alert grouping in Alertmanager or the paging tool, so one incident pages once. A weekly review of a table like this is what keeps on-call bearable.

Running the incident

When a page arrives, the first decision is whether it is an incident: a user-facing problem that needs coordinated work. Declare one early, by posting in the incident channel or pressing the button in your incident tool. Declaring costs almost nothing. An undeclared problem has no owner and grows.

Then assign roles, following the incident command model the Google SRE book adapted from emergency services:

  • Incident commander (IC): owns the incident. Decides, delegates and keeps the picture. Does not debug.
  • Operations lead: the only person, or small group, changing production. One set of hands avoids two people undoing each other’s fixes.
  • Communications lead: posts updates to the status page, support and leadership at a fixed interval, so nobody interrupts the operations lead to ask.

On a small team one person may hold two roles at first. The IC hands roles out as people join.

Mitigate before you diagnose. The first goal is to stop users hurting, not to understand why. Roll back the latest deploy (rolling back is why fast rollbacks matter), fail over to another zone, switch off a feature flag, or add capacity. If the rollback doesn’t help, you have at least ruled out the deploy. The root cause can wait for the postmortem.

Keep one live document. A timestamped timeline of what was seen, decided and changed, kept by the IC or a scribe. It brings late joiners up to speed in a minute, and it becomes the postmortem’s backbone. Write things like “14:07 rolled back to v412, error rate unchanged”, not “tried some stuff”.

The incident ends when the service is healthy and the IC declares it resolved, not when the root cause is known.

About the video

“Incident Management in SRE Explained (Google SRE Book)” is from Tech Tutorials with Piyush, published September 2026, 18 minutes 58 seconds. The description says it walks the full incident lifecycle the way the Google SRE book teaches it: when to declare an incident, the incident commander, operations lead and communications lead roles, mitigating before finding the root cause, resolution and the blameless postmortem. It then shows the process in an incident tool. It has no chapters. It covers the incident half of this lesson well, but its description doesn’t mention rotation design or page load. English is judged from the title, the detailed English description and the channel’s English-language series. The Conf42 talk by a PagerDuty developer advocate is linked for a second view, and the SRE book chapter is the source for the roles.

Where this fits

Service is restored. The most valuable part comes next, when the team works out why it happened and how to stop it happening again: postmortems and learning from incidents.

Check yourself

  1. 01Why should the incident commander usually not be the person typing commands?

    Debugging takes all of one person's attention. The commander needs to keep the whole picture, decide, and coordinate people, which is impossible while deep in a terminal.

  2. 02You suspect last night's deploy, but are not sure. Roll back now or keep investigating?

    Roll back now if it is safe. A rollback is a quick, low-risk mitigation, and if the problem continues you have ruled out the deploy. Investigation can continue with users unaffected.

  3. 03One engineer got 4 pages in 13 minutes on one afternoon. What should the team look at?

    Whether they were one incident producing several alerts. If so, group the alerts in Alertmanager or the paging tool so one problem pages once.

  4. 04What is the secondary on-call for?

    To take the page if the primary doesn't acknowledge in time, and to give the primary a second pair of hands or relief during a long incident.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark