Why is it taking so long to change the configuration in Azure Cloud Service?

I have an Azure Cloud service. One of the web role contains a configuration that I need to change its value every few days.

Each time I change the value, Azure takes about 10 ~ 15 minutes to complete the procedure. Which is what confuses me as what I changed is just the config value.

So I'm wondering what Azure is doing in the background that makes it so slow?

+3


source to share


3 answers


See the following documentation: Use RoleEnvironment.Changing Event

In general, if your role is not handling the event RoleEnvironment.Changing

, the instance is taken offline, the configuration value is updated, and then the instance is returned to the system



Hence, you can handle this event and respond to the configuration change so that the instance is not restarted.

+4


source


Note: this should be a comment on the accepted answer, but I am apparently not allowed to post them yet ...

While this seems to work for single instance deployments, I found that if I deploy 2 or more instances, Azure still restarts them one by one.



In the portal, they change from "unknown" to "busy" before they end up on the internet, so I'm guessing what it does. And, of course, it takes longer than necessary.

There is nothing in the documentation that says this behavior, which I think is odd.

+2


source


Your instances are being restarted. There is a long-standing but good and up-to-date post by Stephen Nagy: http://www.codeproject.com/Articles/63977/Windows-Azure-Development-Deep-Dive-Working-With-C

0


source







All Articles