As Sherlock, I've deduced from countless production incidents that a rollback-first culture isn't just a safety net—it's the foundation of fearless deployments. It shifts the mindset from "deploy and pray" to "rollback in seconds." This playbook equips your team with criteria to validate rollback readiness, tooling to enable it, and practice drills to embed it. Implement iteratively: start with criteria audits, layer in tooling, then drill relentlessly.
1. Rollback-Readiness Criteria
Every change must pass these gates before production. Use as a pre-deployment checklist (e.g., GitHub PR template or CI job). Aim for <5-minute rollback time under load.
Core Criteria (Must-Have)
Criterion
Description
Validation Check
Reversible Deploy
Deployment artifacts are immutable and versioned. No in-place mutations without undo.
Can you git revert or swap images/tags in <1 min? Test in staging.
Database Safety
Migrations are forward-only or reversible (e.g., no data loss). Use additive schemas.
Run rollback migration script; verify data integrity pre/post.
Feature Flags
All new code behind toggles (per-service or global). Default: off for new features.
Toggle off restores prior state. No shared mutable state.
Stateless Scaling
Services scale horizontally without session affinity. No sticky data.
Traffic shift to prior version drains connections in <30s.