SYSTEM DESIGN SKETCHBOOK / PRACTICE SHEET / NO. 46
Design an on-call paging and escalation system
Engineering teams point their monitoring tools at your service. When something breaks, it works out who is on call right now, wakes them up by push notification, SMS and phone call, and moves up a chain of people if nobody responds. For the people being paged, this is the one system that must not fail quietly.
Requirements
- Teams define rotations (weekly, daily, follow-the-sun handoffs) with temporary overrides, and escalation policies such as: level 1 for 5 minutes, then level 2, then the manager, repeat twice.
- Accept alerts over an API, group duplicates into incidents, and page the current on-call person through each of their contact methods.
- An acknowledgement from any channel stops escalation; resolving closes the incident.
- Keep an audit trail of every page attempt, delivery receipt and state change.
Constraints and assumptions
- 20,000 teams and 200,000 users; normally about 50 new incidents a minute, but a regional cloud outage can produce 50,000 alerts in 2 minutes.
- The first page must leave within 30 seconds of the alert; escalation timers must fire within 15 seconds of their deadline.
- A page must never be lost, even if a datacenter or a messaging provider fails. A duplicate page is annoying but acceptable.
- SMS and voice go through two third-party providers, each with rate limits and their own outages.
Out of scope for the first sketch
Evaluating alert rules (the monitoring side) · Postmortems and incident timelines · Chat integrations · Billing
Draw your design
Rough math and notes
SYSTEM DESIGN SKETCHBOOK / FOLLOW-UPS
Design an on-call paging and escalation system
Finish your first sketch before answering these. Cross out freely.
- Given a weekly rotation and two overrides, how do you compute who is on call at 03:00 on the night a daylight saving change happens in the team's time zone?
- Where does the "escalate after 5 minutes" timer live, and what happens if the machine holding it dies at minute 4?
- The engineer acknowledges by SMS at the same moment the escalation timer fires. Who gets paged?
- A cloud outage sends 50,000 alerts in 2 minutes. How do you avoid paging one engineer 3,000 times while still paging every affected team?
- The primary SMS provider accepts messages but has quietly stopped delivering them. How do you notice, and what do you do?
Compare afterwards: worked approaches and reading at sketchbook /questions/oncall-escalation/review