This is an original sample question written by itmoshi based on the exam objectives.
A company runs a web application on several VMs behind a load balancer. Application state is kept in an external database that both the old and new versions can read and write in the same way. Its requirements for releasing a new version are: (1) users must experience no downtime; (2) instead of a staged rollout by user group, a single cutover must send all new requests to the new version; (3) if a problem appears after the switch, all traffic must be returned to the old version within minutes; (4) temporarily doubling the cost of the VM tier is acceptable. Which deployment strategy best meets these requirements?
Show answer and explanation
Answer:B A blue-green deployment, which switches all traffic at once and keeps the old environment ready, meets every requirement.
Why it is correct
In blue-green, a separate environment running the new version (green) is built alongside the live one (blue), and the load balancer is switched to it in one step. From then on it sends new requests to the healthy green targets while in-flight requests on blue are allowed to drain, so users see no downtime (1) and every new request goes to the new version (2). Blue is kept running and ready, and application state lives in the shared database, so if a problem appears, new traffic can be redirected back to blue within minutes (3). The VM tier costs roughly double while both environments exist, which requirement 4 allows.
The other options
- ✗ A A rolling deployment avoids downtime, but old and new versions serve requests side by side during the rollout (violating 2), and rolling back means replacing VMs again one batch at a time. It suits zero-downtime updates when you want to keep extra resources to a minimum.
- ✗ C Stopping every VM causes downtime, violating requirement 1. It is the simplest approach, used where downtime is acceptable, such as some internal systems.
- ✗ D A canary release deliberately exposes only some users to the new version first, which is exactly the staged rollout requirement 2 rules out. It suits validating a release in production while limiting the blast radius.
Key takeaway
Comparing strategies → Blue-green: switch all at once, rapid rollback while the old environment stays ready (assuming compatible data), double cost for the duplicated tier during the switch. Rolling: gradual replacement, versions serve side by side, little extra cost. Canary: validate with a subset of users, staged by design. In-place all at once: simplest, but with downtime.