About a year ago, Azure Web App slot swaps were "seamless" - once it was complete, the new instance was warmed up to accept new requests without any delay.
Now, when I swap slots from STAGING
to PRODUCTION
, even after running tests against STAGING
to warm up the app, swapping results in many moments of warm-up time.
How may this have changed, and what can I do to ensure that my app remains 100% accessible during a swap?
Have you made any changes to your slot configs?
There are a few things that I've noticed will contribute to the swap not being immediate after warmup on production, and they kind of make sense if you think about it:
Make sure you have the applicationInitialization setting in your web.config to force the warmup to hit a url on your site before the swap:
<system.webserver>
<applicationInitialization>
<add initializationPage="/" />
</applicationInitialization>
</system.webServer>
If you need to warm up more than the root of your web app try a custom warm-up config
https://azure.microsoft.com/en-us/documentation/articles/web-sites-staged-publishing/#custom-warm-up-before-swap
How may this have changed, and what can I do to ensure that my app remains 100% accessible during a swap?
As far as I know, normally warn up actions should complete in the staging slot before swapping it into production. This eliminates downtime when we deploy web app. The traffic redirection is seamless, and no requests are dropped as a result of swap operations. this blog that Ruslan wrote explained the sequence of actions that happens when a staging slot is swapped into production, you could read it. And as Garrett said, if it does not completely warm up, custom warm-up actions could be helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With