3.3. Application Deployment & Operations
š” First Principle: Deploy frequently, deploy safely, and always have a rollback plan ā because automation and strategy turn deployments from uncontrolled risks into routine operations.
What happens when a deployment goes wrong and there's no rollback strategy? Your application is down, users are affected, and you're scrambling to fix it manually. Blue/green deployments, canary releases, and automated rollbacks exist because every deployment can fail. The question isn't if but when.
Imagine your deployment fails at 2 AM on a Friday. Think of deployment strategies like safety nets: blue/green keeps the old version running until you're confident in the new one, canary sends only a small percentage of traffic to test the waters, and rolling deployments gradually replace instances. Without a strategy, your team is doing manual rollbacks under pressure.
| Strategy | How It Works | Rollback Speed | Risk Level |
|---|---|---|---|
| All-at-once | Replace everything immediately | Slow (redeploy) | š“ High |
| Rolling | Replace instances in batches | Medium | š” Medium |
| Blue/Green | Run old + new side by side | ā” Instant (swap) | š¢ Low |
| Canary | Send X% to new, monitor, expand | ā” Instant (route back) | š¢ Low |
