Courseiva
Develop Azure compute solutionshardMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You host a web application on Azure App Service using multiple deployment slots (production and staging). After swapping staging into production, users report errors. You need to ensure that the staging slot is warmed up before swapping and that any errors during swap cause an automatic rollback. What should you configure?

⚠ Common exam trap

Candidates often confuse 'swap with preview' (which requires manual completion) with automatic rollback, or think that sticky settings alone can handle warm-up and error recovery, when in fact auto swap with a custom warm-up path is the only built-in mechanism that combines both warm-up and automatic rollback.

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

Enable auto swap and configure a custom warm-up path.

Enabling auto swap with a custom warm-up path ensures the staging slot is fully warmed up before the swap occurs, and if the warm-up fails or the application returns errors during the swap, Azure App Service automatically rolls back to the previous slot. This directly addresses the requirement for both pre-swap warm-up and automatic rollback on errors.

Answer analysis

Option-by-option breakdown

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

  • Configure deployment slot settings to be sticky.

    Why it's wrong here

    Configuring deployment slot settings to be sticky ensures that specific application settings or connection strings remain associated with a particular slot, even after a swap operation. This prevents sensitive configurations, like production database connection strings, from being swapped to a staging environment. However, sticky settings do not provide any mechanism for automatically warming up the application or rolling back a failed deployment, as their purpose is solely configuration management.

  • Enable auto swap and configure a custom warm-up path.

    Why this is correct

    Enabling auto swap combined with a custom warm-up path is the correct solution because it automates the entire deployment and verification process. Auto swap automatically initiates the swap after a successful deployment to the staging slot. The custom warm-up path ensures the application fully initializes and becomes responsive before the swap is finalized, and crucially, if the warm-up path returns an HTTP error, Azure App Service automatically rolls back the swap, preventing a broken application from reaching production.

  • Use swap with preview and complete the swap after verification.

    Why it's wrong here

    Using swap with preview allows you to route production traffic to the staging slot while it still runs the staging content, but with the production slot's configuration. This enables testing the new version under real production load and settings before committing to the full swap. However, swap with preview requires manual intervention to either complete or cancel the swap, meaning there is no automatic rollback mechanism if issues are detected during the preview phase, making it less suitable for fully automated, safe deployments.

  • Configure manual swap and run a warm-up script before swapping.

    Why it's wrong here

    Configuring a manual swap requires an explicit action to exchange the content between slots, offering no inherent automation for the swap process itself. While running a warm-up script externally before a manual swap can help initialize the application, Azure App Service does not monitor the script's success or failure to trigger an automatic rollback. This approach lacks the integrated safety and automatic rollback capabilities that are crucial for ensuring zero-downtime deployments and preventing faulty code from reaching production.

About these practice questions

This AZ-204 question is part of Courseiva's 881-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 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-204 exam.