AZ-400 - Design and Implement Build and Release Pipelines (53% of the exam) - Section 3.11

Plan and implement deployment mechanics that minimise downtime, including deployment slots and swap, rolling deployments, hotfix paths, containers, binaries, and database tasks.

Plan deployment mechanics that minimise downtime using deployment slots and slot swap for zero-downtime releases, rolling deployments for incremental rollouts, and hotfix paths for urgent production fixes. Understand how database deployment tasks integrate schema migrations safely into a pipeline without blocking application rollout.

deployment slotsslot swaprolling deploymenthotfix pathdatabase deployment tasks

Practice question for this objective

Free sampleDesign and Implement Build and Release Pipelineshard

An "Azure App Service" runs production and staging slots. A connection string must always point at the production database when the slot is acting as production and at the test database when it is acting as staging, so the value must stay with the slot and not travel during a swap. Other application settings should move with the code when slots are swapped. How should the connection string be configured?

  • AStore the connection string in the production slot only and leave it unset on staging, relying on the swap to copy the production value across to staging whenever the two slots are exchanged.
  • BSet the connection string on each slot and mark it as a deployment slot setting so it is treated as slot-sticky and stays bound to its slot rather than moving when the slots are swapped. Correct
  • CPlace the connection string in "Azure Key Vault" and reference it from both slots, since a Key Vault reference is resolved at runtime and therefore is never carried between slots during a swap operation.
  • DDefine the connection string once at the App Service plan level so it applies to every slot on the plan, ensuring the same value is shared and never changes regardless of which slot is in production.
Mark a slot's setting as a deployment slot setting to make it slot-sticky so it stays with the slot during a swap. By default App Service application settings and connection strings move with the swap so they follow the code into production. Flagging a setting as a deployment slot setting makes it slot-sticky, meaning the value is pinned to the physical slot and does not travel during a swap, which keeps production and staging pointed at their own databases while non-sticky settings still move.

Why A is wrong: Leaving staging unset and depending on the swap to copy the value is the opposite of what is needed, because a normal setting moves during the swap so staging would end up using the production database after exchanging.

Why B is correct: Marking a setting as a deployment slot setting makes it slot-sticky, so each slot keeps its own connection string through a swap, which is exactly how production and staging stay bound to their respective databases while other settings still move.

Why C is wrong: A Key Vault reference secures the value but the reference itself is still an app setting that swaps unless marked slot-sticky, so both slots would resolve the same secret and the per-slot database binding would not hold.

Why D is wrong: App Service does not bind connection strings at the plan level for slots, and a single shared value would give production and staging the same database, defeating the requirement for each slot to target a different database.

See more AZ-400 practice questions, answers explained.

Exam traps in Design and Implement Build and Release Pipelines

Answers that look right on this material and are not. Each one is a distractor from a different question in the AZ-400 bank for this domain.

  • Add a task that runs a hand-written ordered set of incremental SQL change scripts on each release and tracks which scripts have already run in a migrations table to avoid applying the same script twice.

    Why it is wrong: An ordered migration-script approach can be idempotent through a tracking table, but it is migration based rather than state based and does not compare a desired schema model against the live database the way the requirement asks.

  • Increase the App Service plan to a higher tier and add more instances so that the extra compute absorbs the burst of cold requests that arrive in the first seconds after each swap completes.

    Why it is wrong: More instances and bigger compute may soften the symptom but every freshly swapped instance still starts cold, so scaling up treats the load rather than the warm-up gap the swap process is meant to close.

  • Enable auto swap on the staging slot so a successful deployment swaps it into production automatically as soon as the slot warms up

    Why it is wrong: Auto swap removes manual control and triggers the swap immediately after deployment, which is the opposite of validating under production configuration before committing the swap.

Examworthy is not affiliated with or endorsed by Microsoft. Original, blueprint-aligned practice material only.