mediumMultiple Choice
Three Strategies That Minimize Downtime and Enable Quick Rollback
A company uses Azure Pipelines to deploy a web app to Azure App Service. They want to ensure that the deployment is first validated in a staging slot before swapping to production. What should they configure?
⚠ Common exam trap
A common mix-up: candidates confuse deployment slots with separate pipelines or scaling, not realizing that slots provide a built-in, zero-downtime validation mechanism within the same App Service.
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
✓
Use deployment slots in the App Service and configure auto-swap
Azure App Service deployment slots allow you to deploy a web app to a staging slot, validate it, and then swap it to production with zero downtime. Auto-swap automates this process by swapping the staging slot into production after a successful deployment, ensuring validation occurs before the production slot receives the new code.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create two separate pipelines for staging and production
Why it's wrong here
Creating two separate pipelines for staging and production duplicates pipeline configuration, requiring parallel changes for any deployment logic update and increasing maintenance overhead. It also lacks the built-in ability to automatically swap the validated staging deployment into production, so it doesn't provide the streamlined, zero-downtime promotion that deployment slots offer.
- ✗
Use Azure Traffic Manager to route traffic
Why it's wrong here
Azure Traffic Manager operates at the DNS level to load-balance traffic across globally distributed endpoints, but it does not manage deployment slots or provide the staged validation and automatic swap workflows needed for safe application releases. It simply routes users to backends, so it cannot replace the slot-based staging environment in App Service.
- ✓
Use deployment slots in the App Service and configure auto-swap
Why this is correct
Deployment slots are separate, warm environments in the same App Service plan that allow you to deploy and validate a build without affecting the production slot. Configuring auto-swap promotes the verified staging slot to production instantly with zero downtime, making it the recommended pattern for Azure Pipelines deployments to App Service.
- ✗
Use an App Service plan with multiple instances
Why it's wrong here
Adding multiple instances to an App Service plan increases scale-out capacity and provides high availability, but it does not create a separate environment for testing or validation before production. Every instance runs the same application code, so without a slot, a faulty deployment would go directly to production, offering no staging or rollback safety.
Go deeper
Related to this question
About these practice questions
This AZ-400 question is part of Courseiva's 696-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
3 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. You are designing a release pipeline that must deploy to Azure App Service across multiple regions. Which two practices should you implement to minimize downtime during deployments? (Choose 2)
hard- ✓ A.Use Azure App Service deployment slots and perform a swap
- B.Stop the web app before deploying, then start it after
- ✓ C.Implement a rolling deployment strategy across regions
- D.Deploy to all regions simultaneously
- E.Use a single deployment slot for all regions
Why A: Azure App Service deployment slots allow you to deploy a new version of your application to a staging slot, perform validation, and then swap it into production with zero downtime. The swap operation warms up the target slot and smoothly transitions traffic, ensuring no requests are dropped during the update. Additionally, implementing a rolling deployment strategy across regions reduces the blast radius and allows you to gradually shift traffic, further minimizing downtime during multi-region updates.
Variation 2. Which TWO of the following are benefits of using deployment slots in Azure App Service? (Select TWO.)
easy- A.Automatic rollback on failure.
- B.Independent scaling of each slot.
- ✓ C.Zero-downtime deployments.
- ✓ D.Validate changes in a staging environment before production.
- E.Geographic redundancy.
Why C: Deployment slots enable zero-downtime deployments (C) by allowing you to swap a staging slot with the production slot. The swap operation warms up the target slot's application before routing traffic, ensuring no requests are dropped. This is a core feature of Azure App Service for safe, continuous delivery.
Variation 3. You are designing a release pipeline for a Node.js application that deploys to Azure App Service. The pipeline must run integration tests against the deployed application. You want to use deployment slots to minimize downtime. What is the recommended approach?
medium- ✓ A.Deploy to a staging slot, run tests against the staging slot, then swap to production.
- B.Deploy to the production slot directly and run tests after deployment.
- C.Deploy to a staging slot, swap, then run tests.
- D.Deploy to a staging slot, run tests, then delete the staging slot.
Why A: Deploying to a staging slot first allows you to validate the application by running integration tests against the staging slot without impacting production traffic. After successful testing, swapping the staging slot with the production slot ensures zero-downtime deployment, as Azure App Service swaps the underlying virtual directories and configuration settings instantly.
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.