← Concepts

阅读中文版本

Rollback Automation

Rollback automation makes reverting to the previous version a single command or an automatic trigger, so the mean time to recover is seconds, not the minutes a manual rollback takes under stress.

delivery

Definition

Rollback automation is the practice of making the revert to a previous deployment version a single command — or an automatic trigger on canary failure — so that the mean time to recover from a bad release is seconds, with the previous artifact and configuration retained and the rollback tested.

Context and scope

Applied in continuous deployment, any production system where the recovery time from a bad release is a measured SLO.

Common misconceptions

  • Rollback is just redeploying the old version — it is, if the old version is forward-compatible with the data the new version wrote; without that, rollback is not safe
  • Forward-only is always safer — it is safer when the change is additive; for a breaking change, forward-fix requires a new deploy and rollback is faster

Anti-patterns

  • Automating rollback without testing it, so the first real rollback discovers a missing dependency or a schema mismatch
  • Rolling back a migration that is not reversible, leaving the database in a state the old code cannot read

Related concepts

Authoritative source

https://aws.amazon.com/builders-library/automate-safe-deployments/

What it is

Rollback automation is the practice of making the revert to a previous deployment version a single command — or an automatic trigger on canary failure — so that the mean time to recover from a bad release is seconds, with the previous artifact and configuration retained and the rollback tested. Applied in continuous deployment, any production system where the recovery time from a bad release is a measured SLO. The unit of delivery is the deployable artifact plus its configuration, and the goal is to move changes to production safely, quickly, and reversibly.

How it works

Safety comes from small batches (less change per deploy means less blast radius), automated canaries (a bad change is caught at 1% before it reaches 100%), and reversible deployments (rollback is the default escape, not a rewrite). Speed comes from pipeline parallelism and eliminating the manual gates that batch up changes. Every step produces evidence — test results, scan output, canary metrics — that the next step consumes.

When to apply and pitfalls

Apply whenever the cost of an incident exceeds the cost of the pipeline that prevents it. The pitfall is optimizing deploy speed without investing in the observability and rollback that make speed safe — fast deploys of broken code just reach the outage sooner. Another is treating the pipeline as a checklist rather than a feedback loop that improves with each deployment.