The short answer
Roll back a SaaS release only if the previous version can safely run against the state left by the new one. That includes the database, queued messages, cached values and anything you’ve already sent to a customer or another system.
If a feature flag stops the fault, turn it off first. If the old version can read and write the current state safely, roll back. If the current state has already made the old version unsafe, contain the damage and fix forward. Redeploying the previous image isn’t a plan if it won’t know what to do with the next job in the queue.
Set an abort rule before deploying
Pick one or two customer outcomes that this release could damage. Compare a small release group to unaffected users where you can. Check the quality and volume of the signal: zero errors from two attempts is not much comfort.
A team updating invoice exports might agree to halt immediately on confirmed duplicate exports and stop expansion if completion drops by more than two percentage points versus the control group over a ten-minute window with sufficient requests. Those are example thresholds, not defaults. At low volumes you might use a deterministic test transaction and keep the rollout small until there’s enough evidence.
Google’s SRE Workbook on canarying releases explains why a small, representative rollout and the right comparisons give you a better release signal. In practice, name the person who will look at the result and who can halt the rollout. You don’t want that decision arriving via a meeting invitation.
Decide what each escape route actually does
Switch off the feature when the flag controls the failing path and you’ve proved that turning it off stops new damage. A flag that hides the screen may do nothing for jobs already processing.
Rollback the application when the old version has passed a test against new-state fixtures. Include schema, cached data, queues and any old and new workers that may overlap during deployment. If you’re replacing a field, keep both versions compatible until the old one is safely out of use. AWS’s rollback safety guidance shows how to stage deployments around backwards compatibility.
Fix forward when a release changed state in a way the old code cannot handle safely. Halt the rollout and stop the harmful path if you can. Preserve evidence of what happened. If an email or payment has already gone out, a redeploy won’t unsend it; it may need reconciliation, customer communication or another corrective action.
Copy this release decision card
| Before pressing deploy | Write down the answer |
|---|---|
| Customer workflow at risk | ___ |
| Abort signal, window and minimum evidence | ___ |
| Person authorised to halt | ___ |
| Switch-off test, including worker behaviour | ___ |
| Old-version proof against new data and queued jobs | ___ |
| External side effects and how to reconcile them | ___ |
| Signal that confirms recovery | ___ |
Worked fixture: invoice exports. A new worker writes an export job the old worker can’t read. The canary generated one duplicate export. Halt expansion and stop the new worker from accepting more jobs. Don’t redeploy the old worker into the same queue until it can safely read the new job records or those jobs are deliberately isolated. Reconcile the affected exports. Then prove that a fresh test invoice exports exactly once before resuming.
For real releases, write the fixture as an acceptance test. Run the old version against data written by the new version, not just against a copy from yesterday. That’s the rollback you’ll be relying on.
Rehearse the recovery, not just the deploy
Write the abort rule on the release card before the rollout. State the exact metric, the window and what counts as enough evidence. In a slow workflow, use known test transactions as well as telemetry; waiting for a tidy chart might mean waiting until the end of a client’s billing run. Make it explicit who is allowed to stop expansion even when the person who wrote the change is offline. Give the incident operator access to the recovery controls in advance and check that they can identify the affected cohort.
Rehearse the two directions independently. The first test is that the new application can handle old state. The second is that the previous version can handle state the new application has produced during the canary. Include anything read later by background workers. Keep examples from the test outside production and record which versions ran. If the second test fails, one option is to stage the release: add the ability to read both formats first, then allow the new writer to appear later. That costs an extra deployment and keeps a compatibility path alive for longer. It also buys you a credible exit at the point where you’re exposing real traffic.
In the fictional invoice worker case, suppose the team catches the duplicate after expanding to two tenants. The feature flag prevents new export requests from the product screen, but eight jobs are already queued. Confirm that the worker itself has stopped taking jobs before treating the flag as containment. Record which exports completed and whether any files reached their destination. A named operations owner should reconcile externally visible duplicates before anyone authorises replay. For the remaining jobs, start from the recorded queue state and the tested compatibility plan, not from a guess about which attempts counted.
Decide who lets traffic back in
On the card, make the stop and restart decisions separate. The release lead can halt immediately at the agreed threshold. For restart, ask the workflow owner to verify an export from end to end, the technical owner to confirm the queue has no unresolved incompatible jobs, and the operations owner to confirm existing effects are accounted for. If an export eventually arrives once but goes to the wrong recipient, the release still hasn’t recovered. Keep the rollout small until the agreed evidence is visible and retain the incident trail for the next release. If you’ve had to fix forward, write why the old version was unsafe at the time. It saves a repeat debate when someone reviews the incident later.
Frequently asked questions
Open a question to read the full answer.
Does a feature flag replace a rollback plan?
No. A flag is a way to stop the part of the system that reads it. If the UI respects it but a scheduled worker doesn’t, new customer requests might stop while the damage continues in the background. Part of the release review is proving where the flag is enforced and what happens to work already accepted. Keep the application rollback or fix-forward option explicit even when switching off is likely to be enough.
When can we remove a database field that the old release used?
Once you know which versions, jobs and consumers still read it, and you can either retire them or provide another safe route. Use evidence from the running services and the release plan, not just the new code. Removing a field ends one rollback option; write that down before the change. If an older worker still needs the field for a once-a-month job, an uneventful afternoon after deployment proves very little.
What's a useful abort rule when traffic is too low for percentages?
Start with a handful of deliberate test transactions and a rule for clearly bad outcomes. One known duplicate export may justify a stop even when you can’t estimate an error rate. For noisier signals, state the sample size and wait period before letting the rollout expand. If you still can’t get meaningful evidence without broadening exposure, schedule it for a staffed window and agree the additional risk with the workflow owner.
Should we retry jobs automatically after a rollback?
Only if the system can tell which operations have already taken effect and a retry won’t repeat them. For jobs with external consequences, class the queue into completed, demonstrably pending and uncertain before authorising replay. The uncertain group may need manual reconciliation against the destination or a customer record. Undoing a deployment doesn’t clear that uncertainty. Put the replay decision and owner on the release card while you still have the logs.
Is a release rollback the same as disaster recovery?
No. A rollback usually assumes the service’s data and dependencies are still available and asks which application changes can be reversed safely. Disaster recovery starts from loss or unavailability and asks what a recovery environment can actually run. A destructive release can force you towards restore, but restoring an old point may discard valid customer activity. Treat that as an explicit business decision, not as a default step in rolling back the code.
Next step
Talk to Keith about making production releases easier to reverse.
Put this into practice
Use the editable worksheet
Take the decision you’re facing, put an owner against it and record what would change your mind. The download is an editable CSV with no signup.
