How to configure deployment slots in Azure App Service
Deployment slots enable one to deploy new versions of the app without any downtime but just by swapping app content and configuration elements between the slots. This will enables validation of the changes and warming up the app before getting swapped to a production slot. In case of any issues after the swap, you can immediately swap back to the last known good site back. Also, you have the opportunity to drive some percentage of the traffic to one slot and
In this article, we will see how to configure the deployment slots in Azure Web App.
Step 1: Open any of your existing App Services and in the left pane, select Deployment Slot. Currently, you can see only the production slot is running with 100% of traffic to it.
Step 2: Click Add Slot, provide a Name and choose whether or not to Clone settings from any existing slots, if you opt to clone, app settings, connection strings, language frameworks, HTTP version, and platform business will be cloned. Click on Add.
Step 3: Once the slot is added you can view the slot in the same deployment slot page with zero percentage traffic by default.
Step 4: If you click on the deployment slot, you can see it is having the same management page of App Service with a URL format of yourdomainname-slotname.azurewebsites.net. The slot will be also listed as a separate app in your resource group.
Step 5: You can deploy your new version of the app to the new slot and once you are ready you can come back to the deployment slot page and click on Swap. Here you have the opportunity to review the configuration changes if any and change the target and source slots if you have multiple slots.
There is also an option to select “Perform swap with preview” which has an additional opportunity to verify the result on the slot before the swap happens completely.
Recent Posts
- Implementing Azure Site Recovery for Disaster Recovery: A Step-by-Step Guide
- Import large amounts of data to Azure Storage by Azure Import/Export service
- Configuring a backup of Azure App Service
- How to test application performance with Load Testing
- How to configure Autoscale for App Services in Azure