Question

Difficulty: HardConfigure Azure App Services

You have an Azure App Service web app named app-portal-prod that currently runs on the Basic B1 App Service plan. You need to implement a deployment slot named staging for testing. The staging slot must use a staging database, and the production slot must use a production database. These connection strings must remain with their respective slots after a slot swap operation. Which two actions should you perform? (Select two.)

  1. Scale up the App Service plan to the Standard S1 pricing tier.Answer
  2. Configure the connection strings in both slots and select the 'Deployment slot setting' option for each.Answer
  3. C
    Scale up the App Service plan to the Basic B2 pricing tier.
  4. D
    Configure autoscale rules for the web app with identical scale-in and scale-out thresholds of 80% CPU utilization.

Answer

Scale up the App Service plan to the Standard S1 pricing tier, and configure the connection strings in both slots and select the 'Deployment slot setting' option for each.
To use deployment slots, the App Service web app must run on a Standard, Premium, or Isolated App Service plan. Since the web app currently runs on a Basic B1 plan, scaling up to the Standard S1 tier is required to enable this capability. Additionally, by default, connection strings are swapped when a slot swap occurs. To ensure the production slot always points to the production database and the staging slot always points to the staging database, you must configure the connection strings in both slots as 'Deployment slot settings', which makes them sticky to the slot and prevents them from being swapped.

Step-by-Step Solution

1
Determine the minimum App Service plan pricing tier required for deployment slots.
Identify that the Basic B1 tier does not support deployment slots. You must scale up the App Service plan to at least the Standard S1 tier.
Deployment slots are only available in Standard, Premium, and Isolated App Service plans.
2
Configure the connection strings to be sticky to their respective slots.
In both the production slot and the staging slot, define the database connection string, and check the 'Deployment slot setting' checkbox for each.
By default, connection strings are swapped during a slot swap. Setting the 'Deployment slot setting' (also known as a slot-sticky setting) ensures the configuration remains with the slot and is not swapped.

Key Concept

Deployment slots require a Standard tier or higher App Service plan, and settings like connection strings must be explicitly configured as 'Deployment slot settings' to prevent them from being swapped.
Rate this question