Search code examples
c#azureazure-cloud-services

Azure worker role - prevent recycling


I'm trying something a little weird with the azure cloud service technology. I want to use the autoscaling for both up and down changes.

I'm going to have some instances that are "In Use" though.

Is there any way in a cloud service to either: Mark an instance as non-recyclable or Abort the teardown of an instance in the WorkerRole.OnStop method

If not, what criteria does azure use to determine what gets recycled? Maybe I can keep the instance in a state where azure won't recycle it?

Thanks


Solution

  • In case anyone runs into this, I can accomplish what I need to with Scale Sets https://azure.microsoft.com/en-us/documentation/articles/virtual-machine-scale-sets-overview/