Search code examples
azureazure-web-rolesazure-worker-rolesazure-cloud-servicesazure-deployment

WorkerRole VM Size at Deployment Time


From what I know, there is an option to provide VM size in Cloud Service Package using Role Settings.
But this information is required prior to build.
Is there a way I can decide VM size at the time of deployment?
I have a requirement of a worker role running in different regions and in some regions the load is not much so I want to use a lower size VM.


Solution

  • Currently it is not possible to do so because VM size is defined in csdef file which gets bundled into your package.

    Instead of relying on vertical scalability (i.e. choosing different VM size for different regions based on the load), may I recommend you look at horizontal scalability (i.e. choosing different number of VM instances for different regions based on load). The benefits I see with this approach:

    • Instance count is specified in cscfg file, thus you can build the package but deploy your application to run with different instance count based on the region.
    • Again because instance count is specified in cscfg file, you can scale up/down easily based on your load pattern without having the need to redeploy your code.