On-Call Practices and Runbook Design Questions
Running a sustainable on-call function: rotation design, production-readiness handoffs, and authoring runbooks that let responders act quickly. Covers runbook automation, on-call culture, escalation-ready documentation, and readiness reviews before a service takes production traffic. The operational-preparedness discipline that makes incidents survivable.
Design an on-call rotation for a team spread across multiple time zones that needs to scale from a handful of engineers to dozens across several teams. How do you handle follow-the-sun coverage, backups and holidays, and keep the rotation fair as it grows?
Sample Answer
Direct answer
Design it as follow-the-sun by timezone cluster so no region's primary is ever paged during their own local night, size each cluster's rotation depth from the actual page volume rather than a round number, and add a dedicated reserve pool for holidays so ordinary rotation members never lose a holiday to the primary schedule. Escalation is a separate, timed chain (primary, secondary, reserve, region lead) that has to work even when a whole region is asleep, and scaling from a handful of engineers to dozens has to be phased: standardize runbooks and train people before adding teams, not after.
Structured elaboration
Coverage model. Split engineers into timezone clusters (for example Americas, EMEA, APAC), each covering an 8-hour local-daytime primary window; three 8-hour windows sum to 24 hours of coverage with no cluster ever primary during its own night. Rotation length within a cluster is a separate knob from the coverage model: week-long rotations reduce context-switching and knowledge loss between handoffs, at the cost of a longer stretch of pager exposure per turn; shorter (48-72h) rotations reduce fatigue per turn but increase handoff frequency and the chance something falls through a more frequent seam.
Escalation chain, timed and identical across clusters so cross-region coverage is predictable:
flowchart TD
A[Regional primary paged] -->|No ack in 5 min| B[Regional secondary paged]
B -->|No ack in 15 min| C[Reserve pool paged]
C -->|Unresolved at 30 min| D[Region lead notified]
D -->|Sev1 still open at 60 min| E[Cross-region backup and director]
The 5-minute no-ack step exists specifically for the "primary is unreachable" case, which is a much stronger and faster signal than "primary is working on it but hasn't fixed it yet," so it gets a tighter timeout than the later, more judgment-based steps.
Fairness as an explicit scheduling constraint, not a hope: cap max consecutive on-call weeks per engineer, enforce a minimum rest period between on-call turns, and rotate any unavoidable night-week assignments (for clusters without full timezone coverage) evenly rather than by volunteer, since volunteering predictably concentrates load on the most junior or most available people.
Scaling the rotation as the org grows (1 team to many teams): standardize the runbook format and store it centrally before letting a new team join a shared rotation; require a hands-on training bootcamp and a sign-off before someone goes on primary; roll out in phases (pilot with one or two teams, validate tooling and runbook quality, then add teams in batches) rather than flipping every team onto the new model at once, since an unprepared responder on a shared rotation is itself an incident risk for everyone else sharing that pager.
Worked example
Assumptions, stated explicitly: the org grows from one team of 6 engineers to 6 teams totaling 40 engineers, organized into 3 timezone clusters (Americas, EMEA, APAC) sized roughly to headcount: 14, 13, and 13 engineers respectively (14+13+13 = 40).
- Coverage: each cluster's primary covers an 8-hour local-daytime window; 3 clusters x 8 hours = 24 hours, so no cluster's primary is ever paged during their own local night.
- Rotation depth (EMEA, 13 engineers, weekly rotation): each engineer is primary 1 week out of every 13, i.e. 1/13 ~ 7.7% of weeks, or 52/13 = 4 primary weeks per year.
- Adding a secondary/backup role drawn from the same 13-person pool on an offset week: each engineer also carries secondary roughly 1/13 of weeks, another ~4 weeks/year, for a combined primary+secondary burden of 2/13 ~ 15.4% of weeks, about 8 weeks/year.
- Holiday coverage via a dedicated, org-wide reserve pool sized at 10% of headcount: 0.10 x 40 = 4 engineers who specifically volunteer for the roughly 10 major holidays/year the company observes. Each reserve member covers 10 / 4 = 2.5, so in practice 2 or 3 holiday shifts per year, and nobody on the standard rotation ever gets assigned a holiday primary shift.
- Page-budget sanity check: suppose the org's historical off-hours paging rate needing a primary response is 26 events/year system-wide (about 1 every 2 weeks), split roughly evenly across the 3 clusters: 26 / 3 ~ 8.7 events land on EMEA per year. Spread across EMEA's 13 engineers at 4 primary-weeks each per year, expected pages per engineer ~ 8.7 / 13 ~ 0.7 per year if evenly distributed, which is comfortably under a sustainable design target such as "no more than about 2 off-hours pages per on-call week."
If that page-budget check came out high instead (say, well above 2 pages per on-call week per engineer), the fix isn't to ask people to tolerate it: it's to either add rotation depth (recruit more engineers into the cluster) or fix the alerts generating the load, following the same actionable/urgent/real bar used to keep paging honest in the first place.
Trade-offs and rationale
- Week-long rotations trade a longer stretch of exposure per turn for fewer, higher-quality handoffs; daily rotations trade the opposite. For a growing org, week-long with a strong async handoff template scales better because it doesn't multiply handoff overhead as team count grows.
- Follow-the-sun minimizes local-night work but requires genuinely timezone-distributed headcount; a team concentrated in one or two timezones has to accept some night-weeks and should rotate them explicitly and evenly rather than pretend follow-the-sun applies when the population doesn't support it.
- The org-wide reserve pool adds headcount overhead (4 extra people not on the standard rotation) purely to protect fairness around holidays; that's a real cost, but the alternative (holidays absorbed unevenly by whoever's rotation happens to land there) reliably produces resentment and turnover on-call specifically.
- Phased team onboarding is slower than a big-bang rollout, but an incident caused by an undertrained responder on a newly added team costs the whole shared rotation trust, not just that team, which is why training and runbook standardization go before scaling, not after.
Write a runbook a junior on-call engineer with only basic familiarity could follow to resolve a common recurring failure, like a database running out of connections. How much detail do you include, and how do you make sure it's usable by someone half-asleep at 3am?
Sample Answer
For a junior, half-asleep responder, the runbook needs to be a strict linear sequence of copy-pasteable commands with expected output shown at each step, not a description of the problem. A connection pool is just the fixed set of open database connections an application reuses instead of opening a new one per request; "exhausted" means every connection in that set is busy or leaked, so new requests queue or fail waiting for one to free up. Below is the runbook, followed by how the same template extends to a few other common recurring failures.
Runbook: Database connection pool exhausted
Applies when: alert fires for "DB connections at capacity" or the app logs show timeouts waiting for a pooled connection.
1. Confirm the symptom
-- Postgres: how many connections are open right now, and what state are they in
SELECT state, count(*) FROM pg_stat_activity GROUP BY state;
If active + idle in transaction is at or near the configured pool max, this is confirmed.
2. Check for the two common causes
-- Long-running or stuck queries holding a connection
SELECT pid, state, now() - query_start AS duration, query
FROM pg_stat_activity
WHERE state != 'idle'
ORDER BY duration DESC
LIMIT 10;
A handful of queries running for minutes, not seconds, points at a stuck query holding connections hostage. Many short connections in idle in transaction for the same app host points at a connection leak in that service (it opened a connection and never closed it).
3. Immediate mitigation
- If one or two queries are clearly stuck (duration in minutes, not part of a normal batch job): terminate them.
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid = <PID>;
- If one app instance is leaking connections: restart that instance only, not the whole fleet, to limit blast radius.
# Example: restart a single app instance behind a load balancer
kubectl rollout restart deployment/<app-name> --namespace=<ns>
4. Verify recovery
Re-run the query from step 1. Connection count should drop back under 80% of pool max within a couple of minutes, and application error logs should stop showing connection-timeout errors.
5. Escalate if
- Step 1 confirms the symptom but step 2 shows no stuck queries and no obvious leaking host, escalate to the on-call DBA.
- Terminating queries and restarting the instance doesn't bring connections back down within 10 minutes, escalate to the on-call DBA and the service owner together.
6. Log it
Note in the incident channel: which queries or instance were involved, what you ran, and the connection count before/after. This becomes the input for the next runbook review.
Applying the same template to other recurring failures
The shape (confirm symptom, check the one or two common causes, apply a scoped mitigation, verify, escalate on a threshold) is the same regardless of what's failing:
- A worker process stuck or crash-looping: confirm via the process manager's status command, check recent logs for the crash reason, restart just that worker (not the whole host), verify it stays up for a few minutes, escalate if it crash-loops again within 15 minutes.
- A Kubernetes service unresponsive: confirm via
kubectl get podsshowingCrashLoopBackOffor 0 ready replicas, checkkubectl describe podfor the failure reason, roll the deployment, verify readiness probes pass, escalate if the rollout itself fails. - High database CPU: confirm via the DB's CPU metric, check
pg_stat_activityfor a small number of expensive queries dominating, kill the worst offender if it's not part of an expected batch job, verify CPU drops, escalate if CPU stays high with no single query responsible (that usually means aggregate load, not one query, and needs a scaling decision above a junior responder's authority).
Keeping it usable day to day, not just during an incident
Part of what keeps a junior responder capable of running this cold at 3am is having already looked at the same dashboard during calmer moments. A daily on-call checklist (glance at connection count, query latency, and error rate once per shift, even with no alert firing) means the responder already knows what "normal" looks like on this system before the night it matters, instead of learning it for the first time under a page.
Trade-offs and pitfalls
The runbook deliberately doesn't cover permanent fixes (increasing pool size, fixing the leak in application code, adding query timeouts), those are follow-up work items, not something a junior responder should do live against production under a page; bundling them in would tempt someone under pressure into a riskier change than the incident calls for. The other pitfall is giving a vague duration threshold like "long-running query"; "minutes, not seconds" is deliberately concrete so a junior responder isn't left guessing whether a 40-second query counts.
Where's the line between an operational runbook and a security incident-response playbook, and how do you keep a responder from accidentally leaking something sensitive, like pasting a live credential, into a runbook they're editing during an incident?
Sample Answer
The line is intent, not tooling: a runbook assumes the failure isn't malicious and defaults to fast, reversible operational actions, while a security playbook assumes it might be and defaults to preserving evidence and escalating. The handoff between them has to be a written, specific trigger list, not a judgment call made under pressure.
Runbook versus security playbook
| Dimension | Operational runbook | Security playbook |
|---|---|---|
| Default assumption | Failure is a bug, capacity issue, or bad deploy | Failure may involve an actor with intent |
| Default first action | Restart, scale, roll back, mitigate fast | Isolate and preserve, don't destroy evidence |
| Who leads | On-call engineer or SRE | Security on-call; engineer supports under their direction |
| Speed pressure | Restore service as soon as possible | Get it right; evidence and scope matter more than speed |
Handoff triggers (explicit, not a judgment call)
- A known indicator-of-compromise match (signature, known-bad IP, tampered binary).
- Automated remediation failing repeatedly while a new suspicious artifact appears.
- Any sign of lateral movement or a cross-service authentication anomaly.
- Any alert crossing a predefined confidence-plus-impact threshold agreed with security in advance.
Handoff flow
flowchart TD
A[Runbook step in progress] --> B{Indicator of compromise?}
B -->|No| C[Continue runbook as operational issue]
B -->|Yes| D[Isolate and preserve evidence, non-destructive]
D --> E[Open incident ticket with artifacts]
E --> F[Notify security on-call, SLA clock starts]
F --> G[Security triages within SLA]
G --> H[Security leads containment and investigation]
H --> I[SRE executes infra changes under security direction]
Keeping a live credential out of the runbook in the first place
The mechanism isn't "tell people not to paste secrets," it's removing the need to. Runbooks reference secret IDs resolved from a vault at execution time, the same underlying mechanism used to control access to any sensitive step, so there's rarely a reason to type a raw value into the document at all. For the cases where a responder is genuinely debugging and tempted to paste a live value for reference, a secret-scanning check on the runbook-editing tool (pattern and entropy-based) that blocks the save and asks for a redacted reference instead is a cheaper and more reliable control than relying on discipline during an incident.
Trade-offs and pitfalls
Treating every operational failure as a potential security incident slows down the vast majority of pages that are genuinely just a bad deploy; keep the trigger list narrow and specific rather than "when in doubt, escalate." The more dangerous direction is the opposite: treating every alert as operational until proven otherwise is how evidence gets destroyed by a well-meaning restart before anyone realizes it mattered, so the trigger list has to be actively taught, not just written down somewhere. Keeping runbooks and playbooks in separate systems owned by separate teams is how the handoff criteria silently drift out of sync with what each team actually expects; version-control both in one place with cross-references and joint review.
How would you design a fair, sustainable on-call rotation for a small engineering team that needs 24/7 coverage? Walk through rotation length, the handover process, and how you'd handle travel or time-zone gaps.
Sample Answer
For a small team, the rotation itself should be short enough to feel like a bounded chore (one week is the standard default), paired with a light but mandatory handover so the incoming engineer never starts cold, and a simple swap mechanism for travel or time-zone gaps rather than a rigid schedule that breaks the moment someone takes vacation.
Rotation length
A one-week primary rotation is the sweet spot for most small teams: short enough that a bad week doesn't become a bad month, long enough that the person on duty has time to actually get familiar with whatever is currently flaky, instead of just enough time to get anxious. Pair it with a secondary who's on the same one-week cadence but offset, so there's always a documented next-in-line if primary is unreachable.
Handover process
A handover isn't a courtesy, it's the mechanism that keeps knowledge from re-siloing every week. It should be a short written artifact, not just a verbal "good luck":
- Open incidents and their current status
- Anything flaky or degraded that isn't yet an incident (the "keep an eye on this" list)
- What changed recently (deploys, config, infra) that the next person should know about
- Links to the runbooks most likely to get used this week
Posting this in a shared channel 30 to 60 minutes before the shift boundary, with a quick synchronous check-in if time zones allow, means the incoming engineer starts their week already knowing what's fragile.
Handling travel and time-zone gaps
Every engineer names one designated swap buddy in an adjacent time zone. If someone is traveling or otherwise unreachable for part of their week, they trade the affected days with their buddy (tracked in the same shared calendar the rotation lives in), rather than leaving a gap that only becomes visible when a page goes unanswered. If no buddy is available, the secondary absorbs the gap and the rotation schedule shifts by one slot so no one loses their normal rest week to cover it.
Worked example: how often does it come around, and is that sustainable
For a team of 6 engineers on 1-week rotations, the full cycle length is:
cycle length=team size×rotation length=6×1 week=6 weeksOver a year:
6 engineers52 weeks≈8.7 stints per engineer per yearSo each engineer is primary roughly every 6 weeks, about 8 to 9 times a year. That cadence is generally considered sustainable (there's a full six-week gap to recover and forget how tired last time was) as long as the actual page volume during a stint stays low; the rotation model doesn't fix a noisy alerting setup, it just spreads the noise around fairly.
Batch versus streaming coverage changes the math
A data platform team running batch pipelines can often tolerate a coarser rotation, because most failures surface at known job-completion times rather than continuously, so the on-call person can reasonably plan around a daily check window instead of being reachable every minute. A team running a streaming pipeline doesn't get that luxury: backpressure and consumer lag can develop at any hour, so the same 1-week rotation needs tighter alerting (lag thresholds, not just job-failure alerts) to be equally survivable, even though the schedule itself looks identical on paper.
Trade-offs and pitfalls
Shorter rotations (a few days) reduce individual exposure but multiply handovers, and every handover is a chance for context to leak; longer rotations (two-plus weeks) reduce handover overhead but risk burning out whoever draws a bad week. The most common mistake on a small team is skipping the written handover because "we're small, we all know what's going on", which works fine until the one week someone doesn't, and that's exactly the week an incident happens.
You get paged: p95 latency for a service has spiked and the error rate is climbing, starting a few minutes after a deploy went out. Walk through what you actually do in the first few minutes: what you check, how you decide on a mitigation, and when you'd escalate.
Sample Answer
The first few minutes after a page are for narrowing down scope and cause fast enough to act, not for finding the root cause. I validate the alert is real, figure out how big the blast radius is, check whether it lines up with the deploy that just went out, and pick a mitigation I can undo, escalating the moment the clock runs out on any of those steps.
The first-minutes checklist
- Validate (0-2 min): confirm the page against the actual dashboard, not just the alert text. Is p95 latency and error rate really elevated right now, or is this a flapping alert that already recovered?
- Determine scope (2-5 min): is this one service, one region, or several services at once? Check whether other, unrelated-looking alerts fired in the same window, they're often the same root cause fanning out, not five separate problems.
- Correlate with the deploy (2-5 min): the timing (a spike a few minutes after a deploy) is a strong signal but not proof; pull the diff (code, config, feature flags, schema changes) to see if anything plausibly explains a latency or error increase.
- Choose a reversible mitigation (5-15 min): rollback if the deploy is the clear cause and rollback is safe and fast; scale out or shed load if the cause looks like saturation; flip a feature flag if the change is flag-gated. Prefer whatever gets users out of pain fastest and can be undone if it turns out to be wrong.
- Escalate on the clock, not on ego (by 15 min): if scope, cause, or mitigation isn't clear by 15 minutes, escalate, that's a threshold, not a judgment call to second-guess in the moment.
Decision flow
flowchart TD
A[Page: p95 latency + error rate up, deploy went out minutes ago] --> B[0-2m: Validate against real dashboards]
B --> C[2-5m: Determine scope: one service or several]
C --> D{Timing matches the deploy?}
D -->|Yes| E[Pull diff: code, config, feature flag, schema]
D -->|No| F[Check shared dependency: DB, network, upstream API]
E --> G[5-15m: Pick a reversible mitigation]
F --> G
G --> H{Recovering by 15m?}
H -->|Yes| I[Validate recovery, stand down, write timeline]
H -->|No| J[Escalate: page secondary and service owner, open incident]
Telling apart the three usual causes when several services fail together
When multiple services degrade at once, the fastest disambiguation is checking one thing first: are the affected services related by a shared dependency, or only by being on the same network path?
- Shared dependency outage (a database, cache, or upstream API multiple services call): errors cluster around calls to that one dependency across otherwise-unrelated services; the fix is usually failover or shedding load to the dependency, not touching the calling services.
- Network partition: services can't reach each other or a shared resource, but each service is individually healthy when checked in isolation (CPU, memory, internal logic all fine); the fix is on the networking layer, not application code.
- Code bug from the recent deploy: failures track cleanly to services that received the deploy, and services that didn't receive it stay healthy; the fix is rollback.
The tell is the failure pattern: dependency outages show a common downstream call in every affected service's error logs, network partitions show healthy services that simply can't connect, and deploy-caused bugs map exactly to the set of services the deploy touched.
Two scenario variants worth knowing
A gradual climb (latency creeping up over 20 to 30 minutes rather than spiking) usually points at a resource exhaustion pattern, a connection leak or a slowly growing queue, rather than a bad deploy; the checklist is the same but step 3 shifts from "what deployed" to "what's been running long enough to leak." A regional error spike on a payments API narrows scope immediately to that region's infrastructure or a regional dependency, and raises the severity bar (payments plus regional means check whether it's revenue-impacting before deciding the escalation urgency).
Trade-offs and pitfalls
The most common mistake under pressure is skipping validation and mitigating against the alert text instead of the live dashboard, which can mean fixing a problem that already resolved itself while missing the real one. The second most common mistake is treating the 15-minute escalation threshold as optional because "I'm close", escalating early and being wrong costs a few minutes of someone else's attention; escalating late during a real outage costs users.
Unlock Full Question Bank
Get access to all On-Call Practices and Runbook Design interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.