AZ-400 Practice Question: Design and implement build and release pipelines
Your release pipeline deploys to Azure App Service using a deployment slot. You need to ensure that after swapping slots, the staging slot retains the previous production configuration for rollback. Which deployment strategy should you use?
⚠ Common exam trap
The trap is that candidates may confuse general deployment strategies like blue-green or canary with Azure App Service's slot swap mechanics. While blue-green deployment is conceptually similar, the specific Azure feature that uses deployment slots and supports preview validation before swap is 'swap with preview'. A common mistake is to think a standard swap does not retain the previous production configuration in the staging slot, but in reality it does; the key differentiator of swap with preview is the preview phase that allows you to validate the app before the swap is finalized.
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
✓
Swap with preview
Swap with preview (multi-phase swap) is the correct strategy because it uses Azure App Service deployment slots to validate the staged version before completing the swap. When the swap is completed, the staging slot receives the previous production code and configuration, preserving a rollback state. If a problem occurs, you can swap back to the staging slot. Note that a standard slot swap also preserves the previous production state in staging, but swap with preview adds the benefit of preview validation before finalizing the swap, which aligns with the requirement of maintaining rollback capability.
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 deployment
Why it's wrong here
Rolling deployment is incorrect because it replaces running instances incrementally, rather than using Azure App Service deployment slots to stage and validate a build before routing production traffic. It lacks the ability to preview the deployment in an isolated staging environment and perform a controlled swap.
- ✗
Blue-green deployment
Why it's wrong here
Blue-green deployment is incorrect because it typically involves two fully separate environments (e.g., staging and production) with traffic switched at the load balancer, not the Azure App Service slot swap with preview. The scenario specifically describes deploying to a single App Service using its built-in slot swap, which is a distinct mechanism.
- ✓
Swap with preview
Why this is correct
Swap with preview is correct because it deploys the new build to a staging slot, allows you to validate it before performing a manual swap, and retains the previous configuration in the staging slot for easy rollback. This is the standard Azure App Service pattern for safe, zero-downtime releases.
- ✗
Canary deployment
Why it's wrong here
Canary deployment is incorrect because it gradually shifts a percentage of live traffic to the new version, whereas swap with preview uses a binary swap between staging and production slots. While Azure App Service supports traffic routing rules, the described scenario relies on slot swap with preview, not incremental traffic shifting.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Release pipeline
A Release pipeline is an automated sequence of steps that takes software from code commit to production deployment, ensuring quality and consistency.
Key term
Deployment slot
A deployment slot is a live staging environment in Azure App Service that allows you to swap app versions with zero downtime for testing before going to production.
About these practice questions
This AZ-400 question is part of Courseiva's 823-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 →
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.