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.
Some runbook steps involve sensitive actions, like production database admin commands or rotating credentials. How do you control who can run those steps and keep it auditable, without slowing a responder down during a real P1?
Sample Answer
Don't gate sensitive steps behind standing credentials a responder already holds. Gate them behind short-lived, narrowly scoped credentials issued by the runbook orchestrator at the moment of use, with a pre-authorized fast path for the highest severities so speed during a real incident doesn't require quietly bypassing the audit trail.
Comparing access models
| Model | Speed during a P1 | Auditability | Blast radius if leaked |
|---|---|---|---|
| Shared static credential in a vault everyone can read | Fast | Poor, can't tell who actually used it | High, valid indefinitely until manually rotated |
| Manual per-use approval (ticket plus human sign-off) | Slow, adds minutes exactly when they're scarce | Good | Low, but the delay is itself a cost during a P1 |
| Just-in-time ephemeral credential (vault-issued, scoped, short TTL, auto-revoked) | Fast for pre-authorized P1 paths | Excellent, tied to identity, ticket, and TTL window | Low, expires on its own even if forgotten |
Worked example: sizing the credential TTL
If the median observed time to complete a given remediation step across past incidents is 12 minutes, a 15-minute TTL leaves almost no margin:
Margin=15−12=3 mina responder who hits a snag is interrupted 3 minutes short of done, exactly when stopping is most disruptive. A TTL of roughly 20 minutes, the median plus a working buffer rather than an open-ended grant, gives room to finish without leaving a long-lived credential outstanding. A 4-hour TTL "to be safe" instead means a credential compromised from a responder's terminal during that window stays valid for the rest of the shift; that's the trade being made for the extra convenience.
Keeping it auditable without slowing the responder down
- Runbooks reference secret IDs, never raw values, so the document itself is safe to read even if it leaks.
- The orchestrator executes the sensitive step server-side where practical, so the responder never sees the decrypted secret at all, only the outcome.
- Every credential issuance logs identity, ticket or incident ID, scope, and TTL to an immutable log, correlated automatically rather than reconstructed after the fact.
- The highest severities get pre-authorized issuance, no waiting on a human approver, precisely because the TTL and logging, not a manual gate, are what keep it auditable.
Trade-offs and pitfalls
A break-glass path needs more audit rigor than the normal path, not less; pair any emergency bypass with mandatory post-incident review and automatic rotation of whatever it touched. Auto-approval for the highest severities removes a human gate exactly during the highest-risk window (a real incident, adrenaline, and possibly an actor exploiting the chaos), so the TTL and logging have to carry that weight instead. Orchestrator-executed remediation is safer for the responder but adds its own risk surface; the automation itself now needs the same change-review rigor as production code, not less because "it's just a script."
Walk me through the full lifecycle of a production incident, from how it's first detected through the post-incident review. What happens at each stage, and what concrete artifacts come out of it?
Sample Answer
A production incident moves through seven stages: detection, triage, investigation, escalation, remediation, recovery validation, and postmortem. Each stage has a specific job and produces a specific artifact, and skipping the artifact (not just the activity) is usually where lifecycle discipline actually breaks down, a team can do all the right actions and still lose the value if nothing gets written down for the next stage or the next incident to build on.
The lifecycle
flowchart LR
A[Detection] --> B[Triage]
B --> C[Investigation]
C --> D[Escalation]
D --> E[Remediation]
E --> F[Recovery validation]
F --> G[Postmortem]
D -.->|if needed| C
Escalation isn't strictly linear, an investigation can loop back through another round after escalating in a specialist, which is why that arrow feeds back rather than only forward.
Stage by stage
| Stage | What happens | Artifact produced |
|---|---|---|
| Detection | Monitoring, synthetic checks, or a customer report first surfaces the problem | An alert or ticket with a timestamp and initial signal |
| Triage | Severity is assigned based on impact and scope; an IC (Incident Commander, the person directing the response) is named for anything above a low-severity threshold | An incident record with severity, owner, and affected services |
| Investigation | Logs, traces, metrics, and recent changes are examined to narrow down the cause | A working hypothesis and supporting evidence (queries run, graphs pulled) |
| Escalation | If the current responder lacks the context or authority to mitigate, a specialist or more senior IC is pulled in on a time budget | An escalation log: who was paged, when, and why |
| Remediation | The chosen mitigation (rollback, scale, config change, failover) is executed | A record of exactly what was changed, by whom |
| Recovery validation | Metrics are confirmed back to baseline before declaring the incident over | A recovery confirmation (before/after metrics snapshot) |
| Postmortem | A blameless review of the timeline, root cause, and what should change | A written postmortem with tracked, owned action items |
Why the artifacts matter as much as the actions
An incident that's handled well but produces no artifacts is invisible to everyone who wasn't in the room: the next on-call engineer can't learn from it, the postmortem has no evidence trail to work from, and "what actually happened" becomes reconstructed memory instead of a timeline. The scribe role during a live incident exists specifically to make sure the investigation and remediation artifacts get captured in real time, because reconstructing a timeline after the fact from memory is unreliable and slow.
Blameless postmortem practice
The postmortem stage only works if it stays blameless in substance, not just in name: it asks what allowed the incident to happen (a missing safeguard, a gap in monitoring, an undocumented dependency) rather than who made the mistake. A postmortem that names an individual as the cause teaches everyone watching to hide problems rather than surface them, which is the opposite of what the stage exists to produce. The concrete output is a short list of action items, each with a named owner and a tracked ticket, not a narrative that ends with "we'll be more careful."
Trade-offs and pitfalls
Some teams try to skip investigation and jump straight to remediation under pressure, which sometimes works for well-understood failure modes but risks applying the wrong fix when the pattern only looks familiar. The more common failure across the whole lifecycle is letting the postmortem's action items go untracked once the adrenaline of the incident fades, an incident that produces a postmortem with no completed follow-through is functionally the same as one with no postmortem at all, just with more paperwork.
An automated remediation keeps firing and the service flips between healthy and unhealthy as a result, a feedback loop. How would you design the automation to avoid this kind of flapping?
Sample Answer
Direct answer
Stop the flap by putting a circuit breaker on top of the remediation itself: require a minimum number of consecutive failures before acting at all, cap how many automated attempts happen before backing off exponentially, and open the breaker entirely, stopping automated action, after repeated failures so the automation isn't the thing keeping the service oscillating. The automation should get less aggressive the more it fails, not equally aggressive every time.
Structured elaboration
State machine
stateDiagram-v2
[*] --> Closed
Closed --> Remediating: threshold breached
Remediating --> Closed: health recovers
Remediating --> Open: still failing after attempt
Open --> HalfOpen: cooldown elapses
HalfOpen --> Closed: canary healthy
HalfOpen --> Open: canary fails
Open --> HumanApproval: max attempts reached
Why each piece prevents flapping
- A failure-count threshold before acting at all, requiring multiple consecutive failed health checks within a window rather than one, filters out single transient blips that don't need remediation.
- An exponential cooldown between attempts means each retry backs off further, so a persistent problem gets fewer, more spaced-out remediation attempts instead of a tight restart loop.
- The circuit breaker's open state, where the system stops acting entirely and escalates to a human after enough failed attempts, is what actually breaks the flap, not just slows it down.
- The half-open probe tests recovery with a single canary instance or request after the cooldown, before trusting the system enough to resume full automated remediation.
- Staggered, single-instance restarts that respect the dependency graph prevent one service's remediation from cascading into a restart storm on services that depend on it.
Worked example
With a base cooldown of 60 seconds and a cap of 1800 seconds (30 minutes), the cooldown after the nth failed attempt is:
cooldownn=min(base⋅2n−1,max)
cooldown1=min(60⋅20,1800)=60 s
cooldown2=min(60⋅21,1800)=120 s
cooldown3=min(60⋅22,1800)=240 s
cooldown4=min(60⋅23,1800)=480 s
cooldown5=min(60⋅24,1800)=960 s
cooldown6=min(60⋅25,1800)=min(1920,1800)=1800 s
After the sixth failed attempt the breaker opens: no further automated action until a human intervenes. This pattern applies whether the underlying trigger is a transient availability-zone network partition, a database connection-pool spike, or intermittent upstream timeouts. The automation doesn't need to know which cause it's looking at, because the backoff and breaker behave the same regardless.
Trade-offs and pitfalls
- Tuning the failure-count threshold too low means genuinely fast-recurring problems get no remediation attempt before the breaker opens; too high delays help for the transient blips the system was meant to catch.
- A longer maximum cooldown reduces flap risk but leaves a genuinely fixable problem unremediated for longer; the cap should be informed by how long a typical transient cause, like an AZ partition or a connection spike, usually takes to self-resolve.
- Forgetting the dependency graph is the most common miss: fixing one service's flap by restarting it can trigger a second flap downstream if that service health-checks against the still-recovering upstream.
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.
How would you build a cost-benefit case for automating a recurring operational task, rather than continuing to have engineers handle it manually?
Sample Answer
A credible automation case has three parts: the annual cost of doing the task manually (engineer time plus any revenue or SLA impact), the fully loaded cost of building and maintaining the automation, and a residual-risk line for when the automation itself misfires. Turn those into a payback period and an annual ROI, then restate the same numbers for a non-technical audience as "what we spend today versus a one-time investment that pays for itself in N months."
Inputs the model needs
| Variable | Meaning |
|---|---|
| F | Incidents per year requiring this manual task |
| H | Manual engineer-hours per incident |
| C | Fully loaded hourly cost of the engineer |
| R | Revenue or SLA impact per incident |
| D | One-time development cost of the automation |
| N | Years over which you amortize D |
| M | Annual maintenance cost of the automation |
| p | Probability the automation misfires per run |
| C_f | Cost when it misfires (human cleanup time plus any extra impact) |
The formula
ToilannualAutomationannualResidualannualNet savingsPayback (months)=F×(H×C+R)=ND+M=F×p×Cf=Toilannual−Automationannual−Residualannual=Net savings/12DWorked example: a noisy alert that fires 300 times a year
Assumptions (pinned): F = 300/year, H = 0.4 hours, C = $75/hr, R = $100/incident, D = $20,000, N = 2 years, M = $4,000/year, p = 2%, C_f = $175/misfire.
ToilannualAutomationannualResidualannualNet savingsPaybackROI=300×(0.4×75+100)=300×130=$39,000=220,000+4,000=$14,000=300×0.02×175=$1,050=39,000−14,000−1,050=$23,950=23,950/1220,000=1,995.8320,000≈10.0 months=14,00023,950×100≈171%Translating it for a non-technical stakeholder
The pitch a CFO or exec sponsor needs is the same numbers, stripped of the formula: "this task currently costs the team about $39k a year in engineer time and SLA impact. A $20k investment, amortized over two years plus $4k a year to keep it working, pays for itself in about ten months and then keeps saving roughly $24k every year after that, with a 2% chance any given automated run still needs a human to clean up after it." Leading with the payback date and the residual-risk number, not just the savings, is what makes the pitch credible instead of salesy.
Trade-offs and pitfalls
If F is seasonal or unstable, a single annual estimate is misleading; revisit the model quarterly rather than trusting a number computed once. Don't drop the residual-failure term to make the case look better: an automation that works 98% of the time but corrupts state on the other 2% can be a net negative if C_f is large, especially for destructive actions. A common wrong turn is pitching automation using only "engineer-hours saved" and skipping maintenance and residual-risk costs entirely; that consistently overstates ROI and makes the next proposal harder to trust once someone notices the gap.
Unlock Full Question Bank
Get access to all 42 On-Call Practices and Runbook Design interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.