Incident response and recovery
Prerequisite: node-slos-and-error-budgets. Objective: Write timeline and remediation. Each example is independent. Use Node.js 22.16.0 in a disposable directory; save as main.mjs and run node main.mjs. No external service is contacted.
How it works
Assign a coordinator, technical lead and communication owner. Record timestamps, observations and decisions separately from hypotheses. First limit impact using reversible changes such as stopping a rollout or disabling a noncritical feature. Check business outcomes and dependencies before declaring recovery. Preserve relevant redacted evidence and do not destroy it during cleanup. After recovery, record contributing factors, detection gaps, corrective actions, owners and deadlines without blaming individuals.
Order a synthetic incident timeline
const events=[{minute:8,event:'rollback'},{minute:2,event:'alert'},{minute:12,event:'verified recovery'}];console.log(events.toSorted((a,b)=>a.minute-b.minute).map(e=>e.event).join(' -> '));Expected output:
alert -> rollback -> verified recoverySorting evidence supports chronology; chronology alone does not establish cause.
Require recovery evidence
function recovered(s){return s.errorRate<=0.001&&s.orderCheck&&s.queueDraining;}console.log(recovered({errorRate:0,orderCheck:false,queueDraining:true}),recovered({errorRate:0.0005,orderCheck:true,queueDraining:true}));Expected output:
false trueThe fictional gate checks user outcomes and queue recovery, not just HTTP errors.
Common mistake
Do not restart everything before collecting evidence or claim the last change caused the incident solely because it preceded the alert.
Practice
Write a timeline and two corrective actions for a deployment that returns healthy probes while checkout fails.
Reference candidate: node-incident-response-and-recovery-lookup (route unverified). Documentation anchor: https://sre.google/workbook/table-of-contents/ (related documentation, not exact-version validation).
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Incident response and recovery — knowledge check
Apply the lesson to a fresh scenario and explain the evidence boundary.
What is a useful first objective?
What proves recovery in the checkout example?
How should a postmortem action be recorded?