Courseiva

AZ-204 Develop Azure compute solutions Practice Question

A report export service hosted on App Service returns intermittent 502 errors during deployment. The team wants zero-downtime release with validation before traffic moves. What should be implemented?

⚠ Common exam trap

Watch out — candidates often think restarting the plan or disabling health checks is a valid fix, but these actions cause downtime or remove safety nets, whereas deployment slots with health checks provide the required zero-downtime release and validation.

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

✓

Deploy to a staging slot, validate health, then swap

Deploying to a staging slot and then swapping with production ensures zero-downtime because the swap operation warms up the target slot (staging) before routing traffic to it. The health check validation before swap confirms the new release is stable, preventing 502 errors from reaching users. This approach leverages Azure App Service deployment slots, which support traffic routing and warm-up during swap.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Deploy to a staging slot, validate health, then swap

    Why this is correct

    A staging slot runs the new build on separate instances while production keeps serving. Health checks validate the warmed-up slot, then a swap redirects traffic atomically, eliminating the 502s caused by recycling instances during in-place deployment.

  • ✗

    Deploy directly to production during business hours

    Why it's wrong here

    Deploying straight to production during business hours replaces the live code in place, so requests hit partially loaded instances and 502 errors continue. It is tempting when release windows are tight, but slot swapping with warm-up validation is what keeps the production slot serving throughout.

  • ✗

    Restart the App Service plan before each deployment

    Why it's wrong here

    Restarting the App Service plan recycles every instance simultaneously, causing the very downtime and 502 errors the team must eliminate. It is tempting as a quick reset for unhealthy instances, but deployment slots with warm-up and swap validation are what move traffic only after the staged version is verified.

  • ✗

    Disable health checks

    Why it's wrong here

    Disabling health checks removes the signal App Service uses to decide whether an instance should receive traffic, so faulty instances keep serving and 502 errors worsen. It is tempting when probes cause false failures, but slot swap validation depends on health checks to gate traffic.

About these practice questions

Courseiva writes every AZ-204 question from scratch — 883 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.