Deploy Gone Bad Playbook
A recent deployment introduced errors, degradation, or unexpected behavior. The deployment pipeline said everything was fine, but production is telling a different story. Time to decide: fix forward or roll back.
DEPLOYMENT INCIDENT INDICATORS
- • Error rates spiked immediately after deployment
- • New exceptions/stack traces in logs
- • Feature functionality broken or behaving unexpectedly
- • Performance degradation following deployment
- • Database migration issues or schema conflicts
- • Third-party integration failures
First 7 Minutes: Deploy Analysis
Confirm deployment correlation
Verify timing of symptoms vs. deployment completion. Check deployment logs for errors.
Assess impact scope
Which features/endpoints affected? All users or subset? Error rate percentage?
Identify deployment content
What was in the deploy? Code changes, config updates, dependencies, DB migrations?
Check rollback feasibility
Can we safely rollback? Any irreversible database changes? Data migration dependencies?
Declare incident if significant
If error rate >5% or critical feature broken, declare SEV-2. Get deployment team involved.
Make rollback decision
If rollback is safe and fast: DO IT. If not, assess fix-forward options.
Rollback vs Fix-Forward Decision Matrix
ROLLBACK (Preferred)
Choose rollback when:
- • No database schema changes in deploy
- • No irreversible data migrations
- • Rollback process is well-tested
- • Can complete rollback in <15 minutes
- • Impact is significant (>5% error rate)
- • Root cause is unclear
ROLLBACK CHECKLIST
- ✓ Stop current deployment pipeline
- ✓ Revert application code to previous version
- ✓ Rollback database migrations if any
- ✓ Revert configuration changes
- ✓ Clear application caches
- ✓ Restart services if needed
- ✓ Verify functionality restored
FIX FORWARD (Risky)
Only consider when:
- • Database changes prevent safe rollback
- • Fix is simple and obvious (typo, config)
- • Impact is minor (<2% error rate)
- • Fix can be deployed in <10 minutes
- • Rollback would cause worse problems
- • Previous version had critical issues
FIX-FORWARD RISKS
- • May introduce additional bugs
- • Deployment pipeline delays
- • Extends incident duration
- • Multiple failed fix attempts
- • Team pressure leads to mistakes
Common Deployment Issues by Category
Code Issues
Runtime Errors
- • Null pointer exceptions
- • Type errors/casting issues
- • Missing error handling
- • Async/await logic errors
- • Memory leaks in new code
Logic Errors
- • Business logic bugs
- • Algorithm implementation errors
- • Edge case handling failures
- • Incorrect data validation
- • Wrong calculations/formulas
Configuration Issues
Environment Config
- • Wrong environment variables
- • Missing configuration values
- • Incorrect API endpoints
- • Database connection strings
- • Feature flag misconfigurations
Infrastructure Config
- • Load balancer settings
- • Security group rules
- • Resource limits (CPU, memory)
- • Network routing changes
- • Certificate configurations
Database Issues
Migration Problems
- • Schema migration failures
- • Data type incompatibilities
- • Index creation timeouts
- • Foreign key constraint violations
- • Migration rollback failures
Query Issues
- • New queries causing performance issues
- • Changed query syntax errors
- • Missing database indexes
- • Lock contention from new queries
- • Connection pool exhaustion
Dependency Issues
External Dependencies
- • Third-party API changes
- • Library/package incompatibilities
- • Authentication token issues
- • Network timeout changes
- • Rate limiting problems
Internal Dependencies
- • Microservice communication failures
- • Message queue format changes
- • Shared library version conflicts
- • Service discovery issues
- • Circuit breaker configurations
Step-by-Step Rollback Process
Emergency Rollback (Under Pressure)
STOP deployment pipeline
Prevent any additional changes from being deployed
Identify last known good version
Check git tags, deployment history, or artifact repository
Execute application rollback
Use your deployment tool to rollback to previous version
Rollback database migrations
Run down migrations for any schema changes in bad deploy
Revert configuration changes
Environment variables, feature flags, infrastructure configs
Clear application caches
Redis, CDN, application-level caches that might contain bad data
Restart services if needed
Force pickup of reverted code and configuration
Verify rollback success
Test critical paths, check error rates, confirm functionality
Deployment Incident Communication
Initial Team Alert
🚨 Deploy incident - SEV-2 Time: [HH:MM UTC] IC: [Your name] SITUATION: - Deploy v2.1.47 completed at [HH:MM] - Error rate jumped from 0.2% to 8.4% - New exceptions in user auth flow IMMEDIATE ACTION: - Initiating rollback to v2.1.46 - ETA for rollback completion: 8 minutes - Monitoring error rates during rollback IMPACT: - ~8% of login attempts failing - Other functionality appears unaffected War room: #inc-YYYYMMDD-deploy-rollback Next update: +10 minutes
Engineering Leadership Update
INCIDENT UPDATE - SEV-2 Deploy Rollback Time: [HH:MM UTC] (+15 min) Status: Rollback Complete RESOLUTION: - Successfully rolled back to v2.1.46 - Error rate returned to baseline (0.3%) - User authentication functioning normally ROOT CAUSE: - New auth middleware introduced null pointer exception - Unit tests missed edge case with expired tokens - Error only manifested under production load patterns NEXT STEPS: - Fix identified and in development - Additional test coverage being added - Deploy process review scheduled for tomorrow IC: [Your name]
Prevention Strategies
Pre-Deploy Safeguards
- •Comprehensive test suite including edge cases
- •Staging environment that mirrors production
- •Database migration dry runs
- •Load testing for performance impacts
- •Feature flags for risky changes
Deploy Process Improvements
- •Canary deployments (10% traffic first)
- •Blue-green deployment strategy
- •Automated rollback triggers
- •Real-time monitoring during deploys
- •Deployment approval gates