Azure ConstraintRules not working

I am deploying a very simple Azure cloud service application.

Trying to get Autoscaling work so that I can plan up / down scaling based on time of day.

Install and configure everything, deploy to Azure without any problems, however, my rules do not seem to be respected.

I currently have the following: I expect the service will work in at least 2 instances, but it always stays at 1.

<rules xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/rules" enabled="true"> <constraintRules> <rule name="Default" description="Default rules" enabled="true" rank="1"> <actions> <range min="2" max="8" target="MyRoleName"/> </actions> </rule> </constraintRules> </rules> 

I feel that I am missing something really simple, but I don’t know what?

thanks

+6
source share
2 answers

AFAIR from my Wasabi experience - restriction rules without a schedule will not be executed by the service at all - they do not have special launch conditions. The goal is to limit the maximum and minimum number of instances - so reactive rules cannot be retrained (this can lead to higher than planned costs) and underfunded your service instances (this can lead to violation of the Azure SLA requirements).

I think you should read this article on how to properly configure schedule-based autoscaling for your service. In short, you need a schedule section for the rule. Something like this (shameless break from the link mentioned)

 <rules xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/rules" enabled="true"> <constraintRules> <rule name="Default" description="General Limitation" enabled="true" rank="1"> <actions> <range min="2" max="8" target="MyRoleName"/> </actions> </rule> <rule name="Peak" description="Active at peak times" enabled="true" rank="100"> <actions> <range min="4" max="4" target="MyRoleName"/> </actions> <timetable startTime="08:00:00" duration="02:00:00"> <daily/> </timetable> </rule> </constraintRules> </rules> 
+1
source

Where do you place the Autoscaling app block? Did you just add the settings file to your question? I answer that everything is not so simple. Add a worker role and implement the Autoscaling application block to handle your web role.

Old question / answer: you can compare the steps you took with the following guide / from http://blogs.msdn.com/b/golive/archive/2012/04/26/auto-scaling-azure-with-wasabi -from-the-ground-up.aspx and this is good: http://www.windowsazure.com/en-us/develop/net/how-to-guides/autoscaling/

Without additional information, it would be very difficult to understand what is wrong with your setup.

0
source

All Articles