Choosing Blue-Green Deployment for Zero-Downtime Microservices Releases
You are designing a release pipeline for a microservices application. Each service must be deployed independently with zero downtime. Which deployment strategy should you recommend?
Quick Answer
Blue-green deployment is the right call here: it keeps two complete, identical environments running side by side and switches all traffic to the new one instantly, so each microservice can go live with zero downtime and an immediate rollback path if anything breaks. Rolling updates, feature flags, and canary releases all fall short on the zero-downtime, independent-deploy requirement.
⚠ Common exam trap
Candidates often confuse canary releases and blue-green deployments. While both can achieve zero downtime, blue-green provides an instant full switch and simpler rollback, whereas canary is gradual and requires traffic routing logic.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Blue-green deployment
Blue-green deployment is the correct strategy because it maintains two identical environments (blue and green) and allows instant traffic switch to the new version while keeping the old version running, enabling zero-downtime deployment and immediate rollback if issues arise. This aligns with the requirement of independent deployment for each microservice. Option A (rolling update) is incorrect because it replaces instances gradually, which can cause version skew and does not provide instant rollback. Option B (feature flags) is a technique for feature toggling, not a deployment strategy; it does not handle traffic shifting or environment isolation. Option C (canary release) is incorrect because it routes a small subset of users to the new version, which does not guarantee immediate full zero-downtime deployment and requires gradual rollout and monitoring.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Rolling update
Why it's wrong here
Rolling update does not keep the old version fully available.
- ✗
Feature flags
Why it's wrong here
Feature flags toggle features, not full deployments.
- ✗
Canary release
Why it's wrong here
Canary releases route small traffic to new version.
- ✓
Blue-green deployment
Why this is correct
Blue-green maintains two full environments for instant switch.
Visual reference
Go deeper
Related to this question
Learn chapter
Source Control Strategy Design
Key term
Blue-green deployment
Blue-green deployment is a release strategy that reduces downtime and risk by running two identical production environments, one live and one idle, enabling instant traffic switching between them.
Key term
Environment
An environment is a dedicated set of computing resources, configurations, and services used to develop, test, or host software applications in a controlled and repeatable way.
About these practice questions
One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
5 more ways this is tested on AZ-400
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which THREE are valid deployment strategies supported by Azure Pipelines and GitHub Actions? (Choose three.)
hard- ✓ A.Blue-green
- ✓ B.Canary
- ✓ C.Rolling
- D.Immutable
- E.Recreate
Why A: Azure Pipelines provides built-in deployment strategy definitions for blue-green, canary, and rolling in YAML pipelines. These same strategies can be implemented in GitHub Actions using Azure deployment actions (e.g., Azure App Service slots for blue-green, traffic splitting for canary, and multi-environment jobs for rolling). All three maximize uptime and simplify rollback, making them valid supported strategies. Immutable and recreate are not built-in strategies in Azure Pipelines and are not commonly used as deployment strategy definitions for these platforms.
Variation 2. Drag and drop the steps to perform a blue-green deployment in Azure using App Service slots into the correct order.
medium- ✓ A.1. Create a staging slot, 2. Deploy the application to the staging slot, 3. Validate the staging slot, 4. Swap the staging slot to production, 5. Monitor the production slot
- B.1. Deploy the application to the staging slot, 2. Create a staging slot, 3. Validate the staging slot, 4. Swap the staging slot to production, 5. Monitor the production slot
- C.1. Create a staging slot, 2. Deploy the application to the staging slot, 3. Swap the staging slot to production, 4. Validate the staging slot, 5. Monitor the production slot
- D.1. Create a staging slot, 2. Deploy the application to the staging slot, 3. Validate the staging slot, 4. Monitor the production slot, 5. Swap the staging slot to production
Why A: Blue-green deployment involves creating a slot, deploying to it, validating, swapping, and monitoring.
Variation 3. Which THREE steps should you take to implement a blue-green deployment strategy for an Azure App Service using Azure Pipelines? (Choose three.)
hard- ✓ A.Create a deployment slot named 'staging' for the App Service.
- ✓ B.Enable 'Auto swap' on the staging slot.
- ✓ C.Deploy the new version to the staging slot.
- D.Delete the production slot after swapping.
- E.Route 100% of traffic to the staging slot.
Why A: In a blue-green deployment for Azure App Service using Azure Pipelines, the three key steps are: create a staging deployment slot (A), enable 'Auto swap' on the staging slot (B), and deploy the new version to the staging slot (C). Auto-swap ensures that after the new version is deployed and validated, the staging slot automatically swaps with the production slot, enabling zero-downtime updates. Option D (deleting the production slot after swapping) is incorrect because the production slot continues to hold the previous version for potential rollback. Option E (routing 100% of traffic to the staging slot) is incorrect because traffic routing is handled by the swap operation, not by manually directing traffic.
Variation 4. You are designing a release pipeline for a critical application that must minimize downtime during deployment. The application runs on Azure Kubernetes Service (AKS) and uses Azure SQL Database. Which deployment strategy should you recommend?
hard- A.Rolling update with health probes.
- B.Canary deployment with progressive exposure.
- ✓ C.Blue-green deployment with traffic manager.
- D.Recreate deployment by deleting the old version first.
Why C: Blue-green deployment with Traffic Manager is recommended because it allows you to maintain two identical environments (blue and green) and instantly switch traffic between them via Azure Traffic Manager. This minimizes downtime to the time it takes to update DNS or routing rules, and provides immediate rollback capability by switching back to the previous environment. For a critical application on AKS with Azure SQL Database, this strategy avoids the complexity of managing state during rolling updates and ensures zero-downtime cutover.
Variation 5. A team is designing a release pipeline for a .NET Core web application. They want to deploy to Azure App Service using a blue-green deployment strategy to minimize downtime. Which Azure App Service feature should they use to implement this?
medium- A.Use Azure Load Balancer in front of two separate App Services.
- ✓ B.Use deployment slots with swap operation.
- C.Configure auto-scaling rules.
- D.Use Azure Traffic Manager to route traffic between slots.
Why B: Deployment slots in Azure App Service support swap operations that enable blue-green deployment by swapping the production slot with a staging slot. This minimizes downtime because the swap is warm-up and validation is done in the staging slot before traffic is redirected, and the swap itself is instantaneous under the hood. No external load balancer or traffic manager is needed because the swap operation handles the routing internally.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.