Incident Response — Xử lý sự cố production
Quy trình xử lý sự cố production có hệ thống: emergency triage, coordination, root cause analysis, postmortem.Cú pháp
Luồng hoạt động
Bước 1: Triage
Đánh giá severity (P1-P4), impact scope, affected services.
- P1: Service down, data loss — tất cả hands on deck
- P2: Major feature broken — team lead + on-call
- P3: Minor degradation — on-call engineer
- P4: Cosmetic issue — normal sprint
Bước 2: Coordinate
Phân công roles: Incident Commander, Tech Lead, Communicator.
Tạo war room (Lark group/thread).
Bước 3: Mitigate
Ưu tiên giảm impact trước, fix root cause sau.
Options: rollback, feature flag off, scale up, hotfix.
Bước 4: Root Cause Analysis
Sau khi mitigate xong → tìm root cause.
Dùng 5-Whys hoặc fault tree analysis.
Severity Levels
| Level | Response Time | Who | Example |
|---|---|---|---|
| P1 — Critical | < 15 min | All hands | Service down, data breach |
| P2 — Major | < 1 hour | Team lead + on-call | Payment broken, auth fail |
| P3 — Minor | < 4 hours | On-call | Slow queries, minor UI bug |
| P4 — Low | Next sprint | Assignee | Cosmetic, non-blocking |
Ví dụ thực tế
Khi nào dùng / không dùng
| Dùng | Không dùng |
|---|---|
| Production incident đang xảy ra | Bug trên staging (dùng /fix) |
| Cần structured response process | Issue đã biết, đang fix theo sprint |
| Viết postmortem sau incident | Regular retrospective (dùng /retro) |