Designing a Deployment Strategy
This lesson explains blue-green, canary, ring, feature flag and A/B strategies, and how to tell them apart.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish deployment from release.
- Describe each named strategy.
- Compare the strategies by exposure, rollback and cost.
- Choose a strategy from stated requirements.
Deployment and release are different
Deployment places new code on infrastructure. Release makes a capability available to users. Traditional practice treats them as a single event, so each deployment is also a risk for all users at once. Modern strategies separate them. Code can reach production and stay dormant until a flag or a routing rule exposes it, and exposure can then grow in small steps. This separation is the idea behind all the strategies in this lesson.
The term progressive exposure describes the general approach: release to a small audience, observe health signals, and widen the audience only if the signals are good. Canary releases, ring deployment and percentage-based feature flags are all forms of it.
Deployment or release?
Blue-green deployment
Blue-green deployment keeps two identical production environments. Blue is serving users, and green receives the new version. After testing green, a router, a load balancer or a slot swap moves all traffic to it at once. Blue stays ready, so rollback is an immediate switch back.
This gives near-zero downtime and an instant rollback, and allows full testing in a production-like environment. Its costs are the need for double the capacity during a release, and care with shared databases, since both versions may use the same data. All users move at the same time, so a defect that testing missed reaches everyone.
Blue-green trade-offs
Canary release
A canary release sends a small share of real traffic to the new version, such as 5%, while the rest stays on the old version. The team compares error rates and latency between the two groups. If the canary is healthy, the share rises in steps until it reaches 100%. If not, traffic returns to the old version.
A canary tests with real traffic and limits the damage from a defect, so it detects problems that test environments cannot. It requires good telemetry, and traffic control such as a service mesh, Azure Front Door or App Service traffic routing. Both versions run together during the release, so they must be compatible. In Azure Pipelines, a deployment job can use the canary strategy with increments, and the KubernetesManifest@1 task has a canary option.
The following diagram compares four deployment strategies against a retailer's release goals.

Ring deployment
Ring deployment releases to groups of users in concentric rings of increasing size and diminishing risk tolerance. Ring 0 may be the team itself, ring 1 the whole company, ring 2 early adopters, and ring 3 everyone. Each ring acts as a test for the next. Rings are usually separate deployments, such as different regions or tenants, and a change waits in one ring for a set time before it moves on.
The difference from a canary is the basis of selection. A canary typically picks a random share of traffic to a single environment, whereas a ring picks known groups of users.
Rings of exposure
Feature flags
A feature flag, or feature toggle, is a condition in code that turns a feature on or off without a deployment. Flags let trunk-based teams merge incomplete work, and they let someone switch off a faulty feature within seconds. Percentage rollouts and targeting allow exposure to specific users. The lesson on implementing feature flags explains the configuration in Azure App Configuration.
Flags have a cost. Each one adds a code path to test, and forgotten flags accumulate as technical debt, so each flag needs an owner and a removal date.
A/B testing
A/B testing shows different versions to different users to learn which performs better on a business measure, such as conversion rate. It looks like a canary, but its purpose differs. A canary asks whether a version is safe, while an A/B test asks whether it is better. A/B testing therefore needs enough traffic and time for statistical confidence, and it uses feature flag variants and analytics rather than deployment tooling.
The following comparison summarizes how the main strategies differ.
| Strategy | How users are exposed | Rollback | Main cost | Best for |
|---|---|---|---|---|
| Blue-green | All at once, after a switch | Instant switch back | Double capacity | Near-zero downtime with fast rollback |
| Canary | Small share of traffic, growing | Route traffic back | Good telemetry and traffic control | Validating with real traffic |
| Rings | Named groups in turn | Halt, then redeploy | Time and operating several groups | Large user populations |
| Feature flags | Chosen users or percentages | Turn off the flag | Flag management | Separating deployment from release |
| A/B testing | Variants to segments | Remove the variant | Traffic and analysis | Comparing business outcomes |
Naming the strategy
Choosing a strategy
A retailer's web application serves 2 million users. The team wants each release to reach only 2% of users at first, compare error rates automatically, and then widen. There is no separate environment budget. Which strategy should you recommend?
A canary release fits: it exposes a small share of real traffic and widens in steps as signals allow, using the same infrastructure. Blue-green moves everyone at once and needs a duplicate environment. Ring deployment normally targets named groups and takes longer. A/B testing measures business value, and it does not address the safety goal stated in the scenario.
What question does a canary answer, and what question does an A/B test answer?
Show answer
A canary asks whether a version is safe. An A/B test asks whether a version is better on a business measure.
Exam Tips
Remember for the exam
- Deployment installs code; release exposes it to users.
- Blue-green: two environments and one instant switch.
- Canary: a small share of traffic, widened as signals allow.
- Rings: named groups in turn; canary: a sample of traffic.
- A/B testing asks which is better, not whether it is safe.