
Background
In Conventional web hosting, we deploy or publish an application to hosting and soon after publishing, user can access the application via an endpoint or a domain (say myapplication.com). Consider a scenario of releasing next version of same application, we again need to release the solution into another staging environment which need to have environment settings which is a manual and time-consuming job. In other words, another staging environment need to prepare with same setting manually and release the application. Once the new release passes the testing then again, we need to deploy this into production hosting manually. There are several others background tasks are involved during the release management like taking backup and setting environments likewise.
Another hassle is rollback. If our latest release is having any issues, then we will again need to rollback to previous version manually which is time consuming and error prompt task. Again, reverting settings, environments and all are painful job as well. The major issue is user impact, which means during the release, update and rollback, there will be downtime and end user cannot use the application.
Azure App service gives another remarkable feature to overcome the above mentioned problems which is deployment slots.
Deployment slot, one of the incredible features is probably the most underrated and many people do not know about it.
In this article we will explore about deployment slots, one of the remarkable features of Azure App service which is quite useful for developers and DevOps engineers to over the problems of managing releases and rollback. I will cover following topics in this article.
- Azure App service introduction
- What is deployment slot in azure app service?
- Some facts about deployment slots
- Swapping in Deployment slots
- Rollback
- Setting that are/are not swapped
Let us begin.
Azure App service
Azure app service is one of the services of azure for hosting websites, and APIs. It is a cloud-based platform created and managed by Microsoft. Azure App service is PaaS, platform as a Service where we can quickly build, deploy, and scale web apps and APIs based on your requirements. It works perfectly with .NET, .NET core, Node.js, java, Python or PHP, and other programming languages.
Azure App services are much flexible to developers or DevOps engineer. It has several useful features like scaling or auto scaling in a click, easy authentication and secured with standard security compliance, offline sync (Mobile Apps), hybrid connections, easy sharing, monitoring, and insights, many more configuration and extensive features. It is highly scalable, secured, trusted, and fully managed platform.
You can find many articles in Microsoft docs and c-sharpcorner itself.
Deployment slots in azure app service
This is also called as slotting in azure app service which is one of the amazing features. Let me elaborate with one example.

Suppose we have one azure app service with endpoint production.azurewebsites.net where we have deployed an application and is in production. With the deployment slots feature, we can add another slot which is a full-fledged app service with different end point URL like production-stg.azurewebsites.net. Now, we can copy the configurations and settings of production environments into the newly added slot (called as deployment slot) and can deploy the new release of the application. The new release into this deployment slot will not do any impact on production environments. Therefore, user will continue to access our live application and same time we can deploy next version where we can carry-out full testing and verification.
Swapping is another advantageous feature about deployment slots. Instead of deploying again new release of application into production environment, we can simply swap staging slot (newly added deployment slot) with our production within same app service. The magic of deployment slots: we can do swapping with zero downtime which means, end users will notice nothing and experience no downtime.


Satya KarkiPosted Mar 19, 2021, 9:30 AM
Nice article Rijwan.