I'm having troubles handling usage peaks.
I usually get by just fine with 2 small machines (1core, 1.75 ram), keeping the load under 60%.

The problem is that sometimes usage spikes happen, and CPU goes from the avg 40%-50% to 100% instantaneously.

Is there a way to configure auto-scale to respond to those? like "IF CPU > 90% in Last Minute -> Increase"?
So far, the minimum measurement i've able to set is 5 min, and this is a HUGE amount of time for a application that is practically on deadlock...


I'm assuming we are talking about a virtual machine scale set? The minimum time window you can set for autoscale on this is 5 minutes, so no option to go lower than that.

What you could do is use the Azure Alerts system to trigger an alert when CPU usage is over 90% for 1 minute, this alert could then trigger a webhook, which is calling an Azure Automation script or Azure function that then does the scaling through the Azure API.

Not ideal or easy, but possible. That said the reason why the minimum is 5 minutes is to avoid you scaling up and down every few minutes on small increases in load, so you will need to figure out how to avoid that.

  • quick side question: is there a way to force auto-scale to raise a new machine? – Leonardo Apr 10 '18 at 14:19
  • Not sure what you mean, that's what autoscale in a scale set will do, create more machines. – Sam Cogan Apr 10 '18 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.