Azure Platform: Scaling Up and Down Instances

Note: if you are familiar with the Azure pricing model, just go to the Question section.

Microsoft will begin charging for the use of the Azure platform starting February 1, 2010 . The monthly bill will be a function of bandwidth, storage and others. Among the factors used to calculate the account is the calculation time. However, this last factor has a misleading name: instead, the placement time of the instance instance should be called. Quoting the azure pricing page for windows:

When developing and testing your application, developers will want to remove instances of the calculations that are not used to minimize the bit count of the calculations.

Thus, making you think that it does not calculate hours, but hours of uptime, for which you will pay. Doubt disappears completely after reading the official answer to this question on the MSDN forums:

I can confirm that every instance (of any role) is counted, and all the hours for which you have an instance counter (no matter how much “activity” they have). For an application that has two instances of a web role and two instances of a worker role, you will be billed for four instances

In the case of $ 0.12 / hour per instance, an application using N copies will be billed on average 24 * 30 * 0.12 * N / month = ~ $ 86 / month per instance. Things get worse for smaller websites when you take into account the fact that you cannot have less than two copies if you want a 99.9% uptime service level agreement .

So, a small, inexpensive website with computing power is probably not the target market for Azure. But for batch processes, the burden is likely to disappear.

Question

Speaking only of computing power billing and “clock computing”, Azure will be a good hosting option for a batch process that runs only a few hours a month, if and only if you can scale (and down!) The number of copies easily. So:

  • Can I programmatically increase and increase the number of instances in Azure? Are there any other parameters besides manually changing the configuration file?
  • Are there any unobvious problems with reducing the number of instances?
  • How long does Azure take to “confirm” your application’s downsizing?

Regarding the last question: take the extreme case when you have a lot of instances (say, 1000) working for 45 minutes. If Azure cannot take steps to downscale within 15 minutes after the process is complete, you will be charged for another 1,000 hour hours.

+6
cloud batch-file azure multiple-instances
source share
4 answers

You are right, you pay for hours of work, not for calculating hours.

One thing to be wary of is that you pay for partial hours without any rating, so if you scale quickly up and down, you eat a full hour.

As other people have noted, you can programmatically scale up and down from your application. however, in general, a specific role will have access only to its own metrics (if you do not store the metrics in the repository), as well as any global resource metrics (queue length, etc.), so scale based on CPU usage, etc. may be difficult.

Scaling starts almost instantly when the machine takes several minutes to turn around. There is currently no SLA with spin-up. Microsoft has stated that instances will occur at different times, so if you are performing a very large scale operation, this can be a significant time before all instances are available; but some instances will be available almost immediately. You will not pay for an instance until it is fully deployed.

Scaling happens almost immediately, but you can’t control which instances are used for scaling, so if 50% of your instances are idle and you are doing 50 percent scaling, you can kill all of your active instances, and this job should be restarted before unoccupied copies. You must make sure that your design supports a good restart (if you use timeouts in the queue, this can happen mostly automatically)

There are several third-party solutions that are aimed at helping to scale. One of those that I was looking at the perspective is AzureWatch from http://paraleap.com/ , which offers some things such as automatic scaling up / down for online roles and working roles for use, queue duration, schedule, etc. .d.

+4
source share

A small warning, my comments below are not based on the launch of production applications on Windows Azure; until now, I was simply cheating on him and reading documents.

Can I programmatically increase and increase the number of instances in Azure?

Yes, but AFAIK Azure does not scale up and down on its own, you will have to do this through web service calls (almost the same as using the user interface to do it manually). See this MSDN document , Hosting Services section, and read from there.

Something like a Hudson CI server can be easily expanded to perform basic monitoring of the work queue. Perhaps you need something more than multifunctional; such systems from around the world "corporate service tires" there are quite a lot.

Are there any unobvious problems with reducing the number of instances?

Hmn. You need to think about locking, i.e. How to ensure that every worker leaves the queue in a consistent state and performs their tasks before shutting down?

Also from the Azure Price List: "Partial billing hours are billed as full hours."

How long does Azure take to “confirm” your application’s downsizing?

Honestly, I don’t know, but assuming that your application completely got out of its work, I would assume that it is no more than two minutes. They create new servers fast enough, and I guess starting new servers takes longer than shutting them down.

Try checking it out. Make a cheap account and start several servers, close them, etc. Build a small prototype of your application (or use one of the sample Azure applications) and feel it.

Another aspect: what are your guarantees of scalability when you want? There is currently no such guarantee for any AFAIK cloud provider; but Amazon had a pretty good track record. Azure is a new offer, and we don’t know how good Microsoft's performance score is, i.e. We do not know how well they will work in this in the coming months. I expect this is not a problem; Microsoft will do it well - but I don’t have any evidence yet.

+3
source share

As of June 26, 2013, Windows Azure includes platform-based autoscaling capabilities. So far, only 2 metrics are supported in the preview (processor load and queue length), it is very intuitive and easily resolved. Check it out .

+3
source share

Yes, now with the recently released Startup Application Block , software scaling up and down the number of instances in Azure is easier than ever.

See my detailed answer to this thread .

+2
source share

All Articles