After extended research of Azure documentation we still miss some important details of how Azure built-in cloud service auto scaling works. Our cloud service is simple ASP.NET application with single Web role. By default we deploy to 2 instances to get SLA coverage and than scale up or down by CPU usage one instance at a time. We do use startup tasks to configure IIS and define them in csdef. We do use RoleEntryPoint to specify custom warmup logic inside OnStart event. We are sure that startup tasks and OnStart is not failing with errors.
Following question are derived from my observations and intended to clarify if this is expected behavior.
When cloud service is scaled either up or down each instance that is currently there will be taken out of load balancer for some short amount of time and will not server requests. Is this true and expected?
topologyChangeDiscovery="Blast" in csdef does not change this behavior and instances are still taken out of load balancer during scale operations. Is this true and expected?
If you have N instances in cloud service and it scales to N+1 there will be some time when only N-1 instances serving requests. This time is equal to N * (time required for single instance configuration change). Is this true and expected?
Is there a way to setup auto-scaling to make sure all instances that are currently in cloud service will serve requests without interruption during scale operations? (By any means not only using Azure built-in auto-scaling)
UPDATE:
I have performed test to actually check what instances are serving requests during scale events. Simple console app polls cloud service and records what instance responds to the requests. I have added screenshots of all changes in Azure portal into log files.
Here are results: Scale up from 2 to 3 instances: https://gist.github.com/samfromlv/8029ff0b3fdb3e6bd02a#file-scaleuplog_withscreens-txt
Scale down from 3 to 2 instances: https://gist.github.com/samfromlv/8029ff0b3fdb3e6bd02a#file-scaledownlogs_with_screens-txt
Console app source code and logs format description: https://gist.github.com/samfromlv/8029ff0b3fdb3e6bd02a