5.2 - Deployment strategies (blue-green, canary, rolling)
Cloud+ CV0-004 objective 5.2 covers strategies for releasing changes safely. A blue-green deployment stands up a new version (green) alongside the old (blue) and switches all traffic at once, allowing an instant rollback by switching back. A canary release sends the change to a small percentage of users first to limit risk, then widens if metrics stay healthy. A rolling update replaces old instances with new ones a few at a time until all are updated, avoiding downtime without a full duplicate environment. Immutable infrastructure updates servers by replacing them with new images instead of patching in place, which pairs naturally with these strategies. Expect scenario questions that describe running two full versions and flipping traffic, testing on a small user slice, or replacing instances gradually, and ask which deployment strategy - blue-green, canary or rolling - is being described.
Two full versions, switch all traffic at once = blue-green. Small user slice first = canary. Replace instances a few at a time = rolling update. Replace servers with new images = immutable infrastructure.
Practice questions
1. Deploying a new version alongside the old and switching all traffic at once describes which strategy?
- Rolling update
- Blue-green (correct answer)
- Canary release
- Shadow testing
Blue-green runs two identical environments; you cut traffic from blue (old) to green (new) instantly, with fast rollback. Canary releases to a small subset first.
2. Releasing a change to a small percentage of users first to limit risk is called a:
- Blue-green release
- Canary release (correct answer)
- Rolling release
- Big-bang release
A canary release exposes the new version to a small subset, monitors it, then widens rollout if healthy - limiting blast radius. Big-bang switches everyone at once.
3. The same build artifact is validated in test, then staging, then production without rebuilding. This is:
- Configuration drift
- Blue-green switching
- Artifact promotion (correct answer)
- Chaos testing
Artifact promotion moves one immutable build through environments, so what you tested is exactly what ships. Rebuilding per stage would risk introducing differences.
4. A new feature is deployed but hidden behind a switch you flip to enable it for users later. This uses a:
- Health probe
- Cooldown timer
- Sticky session
- Feature toggle (correct answer)
A feature toggle (flag) ships code dark and lets you enable it at runtime without redeploying, supporting gradual rollout and instant kill switches. Health probes only check liveness.
5. Updating servers by replacing them with new images instead of patching in place follows which principle?
- Uncontrolled configuration drift
- In-place manual patching
- Immutable infrastructure (correct answer)
- Vertical instance scaling
Immutable infrastructure never modifies a running server; you build a new image and replace the old instance, which removes drift and eases rollback. Manual patching invites drift.
6. Replacing old instances with new ones a few at a time until all are updated is which strategy?
- Blue-green swap
- Rolling update (correct answer)
- Canary release
- Big-bang cutover
A rolling update replaces instances in small batches so the service stays up throughout, needing little extra capacity. Blue-green keeps two full environments and flips traffic.