Azure Web App does not autoscale in time

UPDATE: now it works.

I configured our Azure Web App on a scale of 4 to 10 instances to load more than 80% and less than 60% processor load. Autoscale settings

Our site has been loading for more than two hours with a load of more than 95%, but autoscaling has not occurred.

When viewing the "schedule and performance rules", I see that the duration (minutes) is 300. schedule and performance rules

I feel it should be 10 minutes instead, but when I installed and saved it (with valid validation rules), I get this error:

autoscale error

Am I doing something wrong or is there a mistake on the portal?

After I manually turned on at 5, and then decreased to 4, I see that startup is working in the management services log:

ActiveAutoscaleProfile: { "Name": "Default", "Capacity": { "Minimum": "2", "Maximum": "10", "Default": "2" }, "Rules": [ { "MetricTrigger": { "Name": "CpuPercentage", "Namespace": "", "Resource": "xxx", "ResourceLocation": "West Europe", "TimeGrain": "PT1H", "Statistic": "Average", "TimeWindow": "PT5H", "TimeAggregation": "Average", "Operator": "GreaterThanOrEqual", "Threshold": 80.0, "Source": "xxx" }, "ScaleAction": { "Direction": "Increase", "Type": "ChangeCount", "Value": "1", "Cooldown": "PT5M" } }, { "MetricTrigger": { "Name": "CpuPercentage", "Namespace": "", "Resource": "xxx", "ResourceLocation": "West Europe", "TimeGrain": "PT1H", "Statistic": "Average", "TimeWindow": "PT5H", "TimeAggregation": "Average", "Operator": "LessThan", "Threshold": 60.0, "Source": "xxx" }, "ScaleAction": { "Direction": "Decrease", "Type": "ChangeCount", "Value": "1", "Cooldown": "PT5M" } } ] } Description: The autoscale engine attempting to scale resource xxx' from 3 instances count to 2 instances count. LastScaleActionTime: Wed, 03 Jun 2015 09:11:38 GMT Microsoft.Resources/EventNameV2: Autoscale a resource. Microsoft.Resources/Operation: Scale down Microsoft.Resources/ResourceUri: /xxx NewInstancesCount: 2 OldInstancesCount: 3 ResourceName: xxx 

so I see that autoscaling really works.

Is it possible to programmatically change the value?

+5
source share
1 answer

This seems to be a bug on the preview portal. I gave feedback on this here if you want to vote.

The problem is with the TimeGrain property, which exists in MetricTrigger as part of the autoscale rule. It seems that the default preview portal uses this value for 1 hour ("PT1H") without the ability to change it. This will prevent you from setting the Duration value in the portal to less than 60 minutes.

As a workaround, if you use the current portal at https://manage.windowsazure.com and configure the CPU autoscaling for your web application there, then return. Return to the preview portal, you can set the duration of your action to 5 minutes.

Finally, to answer your question about installing this software. Yes, this is possible using management libraries. I will show how to do it here for a cloud service. But it should be the same (or very similar) for web applications. This was more than a year ago, although this may not work 100%, which I wrote about, but it seems that the MetricTrigger class is still basically the same, and this is what you will be most interested in.

+4
source

All Articles