Configure Traffic Routing for Azure App Service Slots | Microsoft AZ-101 Exam

Configure Traffic Routing for Azure App Service Slots

Question

You have an Azure App Service plan that hosts an Azure App Service named App1.

You configure one production slot and four staging slots for App1.

You need to allocate 10 percent of the traffic to each staging slot and 60 percent of the traffic to the production slot.

What should you add to App1?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A

Besides swapping, deployment slots offer another killer feature: testing in production. Just like the name suggests, using this, you can actually test in production.

This means that you can route a specific percentage of user traffic to one or more of your deployment slots.

Example:

https://stackify.com/azure-deployment-slots/

To allocate traffic between the production slot and staging slots in an Azure App Service, you need to configure traffic routing rules. The traffic routing rules specify how much traffic should be routed to each slot based on a percentage value.

To allocate 10% of the traffic to each staging slot and 60% of the traffic to the production slot, you need to perform the following steps:

  1. Navigate to the Azure portal and go to the App Service that you want to configure.
  2. Under the App Service, go to the "Deployment Slots" section and create four staging slots.
  3. Once you have created the staging slots, go to the "Testing in Production" blade.
  4. In the "Testing in Production" blade, click on the "Add rule" button.
  5. In the "Add rule" dialog box, select "Split traffic by percentage".
  6. In the "Split traffic by percentage" dialog box, enter the following values:
    • Production slot: 60%
    • Staging slot 1: 10%
    • Staging slot 2: 10%
    • Staging slot 3: 10%
    • Staging slot 4: 10%
  7. Click the "Save" button to save the rule.

After you have configured the traffic routing rules, the Azure App Service will automatically route traffic based on the percentage values that you specified. 60% of the traffic will be directed to the production slot, and 10% of the traffic will be directed to each staging slot.

Therefore, the correct answer to the question is option A, "Slots to the Testing in production blade".