My web application in Azure has two deployment slots - staging and production.
The purpose of the application is to draw a shape. The version currently deployed to the production slot draws a square. The version deployed to the staging slot draws a circle.
Both versions of the application have an application setting called Colour which controls the colour of the shape. Importantly, this is a deployment slot setting - see the example capture below:
The value of this setting is blue in the staging slot and green in the production slot.
When I view the application in the staging slot, a blue circle is drawn. When I view the application in the production slot, a green square is drawn.
When I perform a slot swap from staging into production and view the application in the production slot, a green circle is drawn.
I am struggling to get my head around this. A big advantage of swapping deployment slots is that I am able to swap my pre-warmed staging code into the production slot and prevent users from suffering from downtime or cold-start performance issues. However, by swapping the staging application into the production slot which has different values in the deployment slot setting, haven't I made changes to the application configuration which will trigger a restart? If I was to modify web.config manually or update the deployment slot setting in Azure, the application in the slot would restart. How is slot swapping getting around this?