Runbook — Incident Response
Basic playbook for production incidents: detect → triage → mitigate → communicate → postmortem.
0. Severity Level
| Level | Definition | Response Time |
|---|---|---|
| SEV1 | All users unable to transact. Revenue impact. | 5 minutes |
| SEV2 | Some users affected / critical feature broken | 15 minutes |
| SEV3 | Degraded experience, workaround available | 1 hour |
| SEV4 | Internal/admin only, not user-facing | Next business day |
1. Detect
Alert sources:
- PagerDuty / Grafana alert
- Sentry error spike
- Customer support via
#support-escalation - PSP / partner report
2. Triage — first 5 minutes
Oncall must:
- Acknowledge the alert in PagerDuty
- Open
#incident-activein Slack, post snapshot:
🚨 [SEV?] <short title>
Impact: <who is affected, how severe>
Detected: <time>
Status: investigating
- Ask "what changed in the last 1 hour?" — check:
- Deploy log:
ssh kesles-prod "journalctl -u dashboard-api --since '1 hour ago' | grep -i deploy" - Recent merge:
git log --oneline --since='1 hour ago' main - Latest migration: check the most recent
schema_migrations
- Deploy log:
3. Mitigate
Rollback deploy (if suspect: recent deploy)
→ see Deploy Dashboard API — Rollback
Rollback feature flag (if there is a flag)
# via the admin dashboard or
curl -X POST https://kesles.com/merchant/dashboard-api/admin/flags/<flag-name> \
-H "X-Internal-API-Key: ..." \
-d '{"enabled": false}'
Scale horizontally (if load spike)
ssh kesles-prod "systemctl start dashboard-api@worker{2,3,4}"
Disable the problematic endpoint (last resort)
Edit reverse proxy config → return 503 + "scheduled maintenance".
4. Communicate
- Internal: update
#incident-activeevery 15 minutes - Status page: https://status.kesles.com (update via admin)
- Customer-facing: if SEV1/SEV2 > 15 minutes → support team sends broadcast email
- Partner: if a partner API is affected → partner PIC is notified via the handover channel
5. Resolve
Once the system has been stable ≥ 30 minutes:
✅ [SEV?] <title> — resolved
Root cause: <brief>
Duration: <start> → <end>
Impact: <actual>
Action items: <tracking>
6. Postmortem
Mandatory for SEV1 + SEV2. Deadline 48 hours after resolve.
Template at merchant_docs/api_docs/internal/docs/dev/runbooks/postmortem-template.md (TBD — not yet created).
Minimum content:
- Full timeline (detect, response, mitigation, resolve)
- Root cause (5-whys)
- Quantified impact
- Action items with owner + due date
- Blame-free analysis — focus on the system, not the person
Contacts
- Oncall rotation: see PagerDuty schedule
kesles-backend-oncall - Tech lead:
#eng-leadsSlack - Security incident: directly to
security@kesles.com+ CTO
Related
- Deploy Dashboard API
- Secret Rotation — if root cause = credential leak