AZ-104 Question 193
Single answerYou have an Azure Web App named 'ContosoApp' running in the Production slot, and you have created a Staging slot to deploy a new version of the application. You also have specific environment variables that should remain consistent whenever you swap between these two slots. Which action should you take to ensure minimal downtime and preserve these environment variables in Production?
- A
Mark the environment variables as 'Slot setting' in the Application Settings and then perform a slot swap.
- B
Add the environment variables as new Application Settings to both the Production and Staging slots, ensuring identical values before swapping.
- C
Depend on the Azure Resource Manager templates for environment variable continuity during the swap.
- D
Configure Load Balancer rules to route traffic between Production and Staging based on the environment variables.
Show answer and explanation
Correct answer: A
Explanation
Deployment slots allow a new version of the application to be tested in a Staging slot before swapping it with the Production slot to reduce downtime. If environment-specific settings need to remain fixed in Production, they should be marked as 'Slot setting' within the Application Settings. This ensures the Production slot keeps its correct configuration without overwriting or losing those values during swaps.
- A. Correct.
By marking environment variables as 'Slot setting,' these values remain fixed in the production environment even after the swap, preserving the required configuration while minimizing downtime.
- B. Incorrect.
Simply having identical values in both slots does not guarantee that Production-specific settings remain unchanged after the swap, and it can introduce manual errors.
- C. Incorrect.
Relying on ARM templates alone does not address how swaps handle environment variables in App Service settings, so this option is not the most direct/efficient approach.
- D. Incorrect.
Load Balancer rules do not affect how App Service handles or preserves environment variables between slots; they only control traffic routing.