Courseiva
Question 391 of 823
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

Shifting Traffic Gradually to a New App Service Slot Over 30 Minutes

Your release pipeline deploys to Azure App Service using deployment slots. You need to ensure that traffic is gradually shifted to the new slot over 30 minutes, and if performance issues occur, it should automatically roll back. Which deployment strategy should you implement?

Quick Answer

The 'Deploy to Azure App Service' task's 'Deploy to Slot' option paired with auto-swap and monitoring is what delivers a gradual, time-boxed traffic shift with automatic rollback — Azure's swap-with-preview mechanism shifts traffic over the configured window and aborts back to the previous slot the moment Application Insights or a configured health check flags a problem.

⚠ Common exam trap

A common mix-up: candidates confuse 'canary deployment' (which often requires manual approval or external traffic routing) with Azure's built-in auto-swap with monitoring, which provides automatic gradual shifting and rollback without additional components.

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 the 'Deploy to Azure App Service' task with the 'Deploy to Slot' option and configure auto-swap with monitoring.

The 'Deploy to Azure App Service' task with 'Deploy to Slot' and auto-swap with monitoring enables a gradual traffic shift over a specified duration (e.g., 30 minutes) using Azure's swap-with-preview and auto-rollback capabilities. When performance issues are detected via Application Insights or health checks, the swap is automatically aborted, rolling back to the previous slot. This meets the requirement for gradual shifting and automatic rollback without manual intervention.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use the 'Deploy to Azure App Service' task with the 'Deploy to Slot' option and configure auto-swap with monitoring.

    Why this is correct

    Correct: Deployment slots support gradual traffic shift and auto-rollback via monitoring.

  • Use two separate deployment slots (blue/green) and manually swap after validation.

    Why it's wrong here

    Manual swap does not provide gradual traffic shift or automated rollback.

  • Use a canary deployment with multiple slots and manual approval gate.

    Why it's wrong here

    Manual approval does not automate rollback.

  • Use an A/B testing deployment by deploying to two different App Services and routing traffic via Traffic Manager.

    Why it's wrong here

    Not a native Azure Pipelines deployment strategy.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way 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. Your organization uses Azure Pipelines to deploy a web application to multiple Azure App Service instances across regions. You need to implement a deployment strategy that allows rolling back to the previous version quickly if issues are detected. Which TWO strategies should you recommend?

medium
  • A.Use a rolling update with incremental deployment.
  • B.Implement a canary deployment with traffic splitting.
  • C.Store previous deployment artifacts in Azure Blob Storage.
  • D.Use blue-green deployment with a traffic manager endpoint.
  • E.Deploy to a staging slot and then swap with production.

Why D: The correct answers are D and E. Blue-green deployment with a traffic manager endpoint allows you to quickly route traffic back to the previous version if issues are detected. Deploying to a staging slot and then swapping with production (slot swap) enables instant rollback by swapping back to the previous slot. Option A (rolling update) does not provide instant rollback because it requires redeployment. Option B (canary deployment) is designed for gradual traffic shifting, not immediate rollback. Option C (storing artifacts) is a good practice but does not itself constitute a deployment strategy for rollback.

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.