Pre-deploy the rollback target, script the reversal, monitor the trigger, and never deploy without testing the rollback path.
A rollback you can actually execute
Pre-deploy the old version
Blue/green: the old environment stays warm. Canary: the old slice keeps serving. Never delete the old artifact on deploy.
Script the reversal
./rollback.shbeats a wiki with twelve steps. Automate the flip.Monitor the trigger
A rollback triggered by a human reading a dashboard is slow. Trigger on error rate above threshold, automatically.
Test the rollback path
A rollback that has never been exercised is not a rollback. Fire it monthly, even if not needed.
Keep migrations reversible
A schema change without a down migration cannot be rolled back. Write both. Test both.