0

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...

Leonardo
  • 121
  • 6

1 Answers1

1

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.

Sam Cogan
  • 38,736
  • 6
  • 78
  • 114