Git, CI/CD & GitOpsLX · Forward Fix versus RollbackCostAndTime
The decision cost and time — MTTR trade-offs and the production discipline
What you'll learn
- Apply the MTTR budget to choose between rollback and forward-fix when both are technically possible
- Recognise when the latency argument and the data-effect argument disagree, and the discipline for resolving the disagreement
- Pre-stage a forward-fix for changes that may need it
- Build the runbook pattern that documents the choice before the change ships
Prerequisites
Verified against Git 2.55.x teaching target; 2.40+ minimum · GitHub Actions continuous service; Aug 2026 documentation baseline · Argo CD v3.5.x teaching target; v3.0+ minimum · Flux v2.9.x · Sigstore Cosign v3.1.x · SLSA v1.2 · OCI Distribution Specification v1.1 · Git LFS v3.7.1 · Kubernetes (cross-course target) 1.36.x
For some changes, both rollback and forward-fix are technically possible. The decision turns on cost and time: which path lands within the MTTR budget, which preserves the data, which the team can execute under incident pressure.
The MTTR budget
MTTR is the time from incident detection to resolution. The MTTR budget is the upper bound the team commits to for a given incident class. The two paths spend the budget differently:
- Rollback. Detection (1-3 min), classification (1-2 min), rollback command (1 min), rollout (2-5 min), verify (2-3 min). Total: 7-14 minutes.
- Forward-fix. Detection (1-3 min), classification (1-2 min), write the compensating change (10-30 min), test in staging (5-15 min), apply (2-5 min), verify (2-3 min). Total: 21-58 minutes.
gantt
title MTTR budget allocation
dateFormat X
axisFormat %s
section Rollback
Detect :a1, 0, 2
Classify :a2, 2, 4
Rollback :a3, 4, 5
Rollout :a4, 5, 9
Verify :a5, 9, 12
section Forward-fix
Detect :b1, 0, 2
Classify :b2, 2, 4
Write fix :b3, 4, 25
Test :b4, 25, 35
Apply :b5, 35, 40
Verify :b6, 40, 43
The forward-fix spends most of its budget writing the compensating change. The rollback spends most of it waiting for rollout. The difference is the 20-30 minutes the forward-fix needs to write the change.
When the budget is the decision
When both paths are technically possible, the MTTR budget determines the answer:
- 15-minute budget, change is rollback-safe: Rollback. The forward-fix exceeds the budget.
- 60-minute budget, change is forward-fix only: Forward-fix. The rollback is impossible.
- 30-minute budget, rollback-safe but data-effect boundary exists: This is the case where the two arguments disagree.
The third case is the one the production discipline must resolve. The rollback is faster; the forward-fix is safer for the data. The choice depends on the relative weight of latency and data preservation. A payment service losing revenue every minute may choose the rollback; a healthcare system that holds patient records may choose the forward-fix. The discipline is to make this choice before the change ships.
The pre-staging discipline
- At design time. The author writes the forward-fix alongside the original change. Reviewed, tested, merged to a branch that is not deployed.
- At deploy time. The original change deploys. The forward-fix branch is ready to merge.
- At incident time. The on-call engineer merges the pre-staged branch, applies the migration, and verifies. The MTTR budget accommodates apply and verify, not write.
The cost is real: two changes to review, two CI runs. The benefit is that the on-call engineer does not spend the MTTR budget writing under incident pressure.
The runbook pattern
The runbook is the mechanism that lets the on-call engineer choose without re-deriving the answer:
- The deploy annotation carries the classification (rollback-safe, forward-fix only, both possible).
- The runbook for the workload links from the classification to the documented path.
- The incident record captures the path taken, the time per step, and the budget consumed.
kubectl rollout undo deployment/$NAME --to-revision=$N
The on-call engineer who runs this command has already classified the change, confirmed the previous revision is the expected good state, and verified the rollback is within the MTTR budget.
Production discipline
- Set the MTTR budget per incident class. Customer-facing: tight (15 min). Batch: relaxed (60 min). Data-only: hours.
- Pre-stage the forward-fix for every change classified as forward-fix only. The forward-fix is a deliverable.
- Document the choice in the deploy annotation. The on-call engineer sees the classification without re-deriving it.
- Track MTTR per incident and per class. A class that consistently exceeds its budget needs more pre-staging or a different mechanism.
- Review the cost-and-time choice in the post-mortem.
Cross-course references
- This course, Part LV-06 (The decision framework) feeds the MTTR budget.
- This course, Part LVIII (Deployment patterns) buys time for the forward-fix.
- Linux for Production Sysadmins - Part XXXI covers detection latency.
Quiz
Knowledge check · 4 questions
Q1. A team deploys a Kubernetes change that is rollback-safe but has a 25-minute MTTR budget. The forward-fix would take 30 minutes to write, test, and apply. The rollback would take 10 minutes. Which path should the team choose?
Q2. Pre-staging a forward-fix for a risky change is not wasted work, because it shortens the response path if the change fails.
Q3. What is the MTTR budget, and why does it determine the rollback-versus-forward-fix choice when both paths are technically possible?
Q4. Apply the cost-and-time framework to a change that is both rollback-safe and forward-fix-able, and propose the operational pattern that lets the team choose without re-deriving the answer.
A team deploys a feature flag to a customer-facing API. The flag controls a new billing path; 10% of traffic is routed to the new path. Within minutes, the billing team's reconciliation reports a mismatch. The change is rollback-safe (the flag can be turned off, no data has been written to the new path). The forward-fix would adjust the reconciliation logic. The MTTR budget for customer-facing incidents is 15 minutes. The on-call engineer is on hour 14 of a 24-hour shift.
Passing score: 75%. Answers are checked in this browser.