I am deploying a very simple Azure cloud service.
Trying to get Autoscaling working so I can schedule scaling up/down depending on time of day.
Have everything installed and configured, deploys to Azure without any issues however my rules don't seem to be being adhered to.
Currently I have the following, which I would expect service to run at a minimum of 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>
Feel like I'm missing something really simple but unsure what?
Thank you
AFAIR from my Wasabi experience - constraint rules without timetable will not be run by service at all - they have no dedicated trigger conditions. It purpose is to limit max and min number of instances - so reactive rules will not be able to over-provisioning (this could lead to higher-than-planned expenses) and under-provisioning your service instances (this could lead to Azure SLA requirements violation).
I think you should read this article about proper way to setup schedule-based autoscaling for your service. In short - you need timetable section for you rule. Something like that (shameless rip from mentioned link)
<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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With