Reputation: 2459
we have a batch operation, progressing some data. The operation takes about 2 hours and needs a lot of RAM at the moment. Therefore we have a cloud service with 56GB of RAM in Microsoft azure. This operation should run each night, so the rest of the 22 hours we pay the service for doing nothing.
I am looking for a simple solution to automatically scale the cloud service to reduce billing. Unfortunately you cannot set the minimum instance size to be zero, when you use the autoscaling feature of microsoft azure.
How do you solve the problem? Are there any tools available?
Upvotes: 0
Views: 369
Reputation: 71031
Assuming you're staying with Cloud Services: While you cannot scale down to zero instances of a web or worker role, you can change the role size (which can be done programmatically, via PowerShell, via CLI, or via portal), and this can be done programmatically. This would give you the option of scaling to the larger size, running your batch processing, and then scaling down to an "idling" size (you could technically scale all the way down to an A0) and, assuming you had scaled to multiple role instances, you could scale in to one instance as well. While this isn't a zero-cost solution, it's very inexpensive ($0.02/hour list price).
Upvotes: 0
Reputation: 136126
You're correct that as of today, Azure Cloud Services can't be scaled down to zero instances. At the very least, one instance is required. One way to solve this problem is to create/delete deployments programmatically using Azure Service Management API. So what you could do is create a job which will:
To schedule this job, you have many options available in Azure:
Upvotes: 1