I am trying to make sure that my website is fully warmed up when I deploy or scale out. To do this I have taken advantage of the App Initialization config as discussed here: http://ruslany.net/2015/09/how-to-warm-up-azure-web-app-during-deployment-slots-swap/
I am trying to get it to work on scale out as it says it is supported here: https://feedback.azure.com/forums/169385-websites/suggestions/6972595-application-initialization-to-warm-up-specific-pag
My config itself is set as follows:
<applicationInitialization>
<add initializationPage="api/status"/>
</applicationInitialization>
I have not specified a hostname on the Initialization element as all discussions seem to say it is not required. I also would be hosting this across multiple environments, and would not know the host names for the scaled out versions and so it would be difficult to have all the config transforms required.
When I deploy the web app the warm up works fine, I can see it be deployed into the staging slot, then go to my Status Page. However when I scale out I cannot see that it is warming up. In fact I can see that api calls made to this api, sometimes come back with a 503 response, which is coming from the newly scaled app.
How can I prevent the scaled out application from receiving requests until it has warmed up? How can I get it to actually do the warm up as discussed here: https://feedback.azure.com/forums/169385-websites/suggestions/6972595-application-initialization-to-warm-up-specific-pag
Thanks
You scale up by changing the pricing tier of the App Service plan that your app belongs to. Scale out: Increase the number of VM instances that run your app. You can scale out to as many as 30 instances, depending on your pricing tier.
Scale-up – Upgrade the capacity of the host where the app is hosted (PAAS environment). Ex: Increase the RAM size from 1 cores to 4 cores. Scale-out – Upgrade the capacity of the app by increasing the number of host instances (PAAS Environment).
We had a similar issue scaling-out app services. When we add new instances, request received 502 Bad Gateway for 3 minutes.
I will explain the steps we follow with a support engineer and we could find our problem.
Add a rule to get a memory dump when request take longer. We add a rule for:
Number Of Requests : 50
Time Taken (Seconds) : 10
Interval (Seconds) : 60
You should change this value for your current workload. Also you can add another rule for 5xx errors...
After change Redis connection to the warm up. We did not have more issue when scaling out our service.
I hope this can help you.
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