展開により問題が発生した場合、ユーザーへの影響を最小限に抑えるため、働いている状態に迅速にロールバックする必要があります。効果的なロールバック戦略 — および監視、自動ロールバック、および前方修正の関連プラクティス — は信頼性の高い展開に不可欠です。
ロールバック機能が重要な理由
Deployments sometimes introduce problems (bugs, errors, performance issues) that get
through testing. When that happens in production:
→ you need to restore a WORKING state QUICKLY (minimize user impact/downtime)
→ a fast, reliable rollback is essential — being able to undo a bad deploy fast
→ "How do we roll back?" must be answered BEFORE you need it.
ロールバックアプローチ
✓ REDEPLOY the previous version — deploy the last known-good artifact/version
(versioned artifacts make this easy: deploy v1.2.2 to undo v1.2.3)
✓ BLUE-GREEN → instant rollback by switching traffic back to the old environment
✓ CANARY → if the canary shows problems, stop the rollout (only a few users affected)
✓ Database changes → trickier (need backward-compatible migrations; see below)
✓ Feature FLAGS → disable a problematic feature without redeploying (instant "rollback"
of behavior)
