TIP

💡 Learn more : App Service Documentation.

📺 Watch the video : How to Test Web Applications in Production.

Intro

We've recently created a web app and uploaded it to Azure App Service. We also took a look at multiple ways to examine those files through the Azure portal interface and how we'd add extensions and deployment slots for our web app. In this post, we'll look at a feature called Routing Rules.

Traffic Percentage Feature of Azure App Service

Go to the Azure Portal and select any App Service that uses at least 2 deployment slots. Click on Deployment Slots under Deployment. Take a look at one of the slots and you'll see traffic percentage.

What is Traffic Percentage This section lets you control how traffic is distributed between your production and other slots. This is useful if you want to try out a new change with a small percentage of requests and then gradually increase the percentage of requests that get the new behavior.

A scenario could be - We'll want to split the traffic to our site into 2 groups to test our new site and see if customers like it.

Production - 75% Staging - 25%

Now keep in mind that we have two versions of our site. One that is production and staging. They are identical except for the staging site has a large font that says jsQuizEngine version 2.

We don't want to swap sites, we just want to distribute traffic between the two sites.

I can test this by going to my production url and refreshing the site until the staging site is shown with the production url.

Success! it works, but what happens when they leave the site? We actually store a cookie that keeps track of it. You can find this cookie yourself by expecting the site and looking for the cookie shown below.

For further reading, then please see this blog post submitted by WizX20.