Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8" ?>
- <serviceModel xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel">
- <subscriptions>
- <subscription name="KWEB.Azure.SubscriptionName"
- certificateThumbprint="XXXXE0F7XXXX88AC933F3EADE369FC5C91B7XXXX"
- subscriptionId="bc42XXXX-8b31-XXXX-a6af-743107e3XXXX"
- certificateStoreLocation="CurrentUser"
- certificateStoreName="My">
- <services>
- <service dnsPrefix="kwebstage" slot="Production">
- <roles>
- <role alias="AutoscalingApplicationRole"
- roleName="KWEB.Website"
- wadStorageAccountName="targetstorage"/>
- </roles>
- </service>
- </services>
- <storageAccounts>
- <storageAccount alias="targetstorage"
- connectionString="DefaultEndpointsProtocol=https;AccountName=storageStageAccountName;AccountKey=XXXXXXXXXXXXXXXXXXXXXXXXXX==">
- </storageAccount>
- </storageAccounts>
- </subscription>
- </subscriptions>
- </serviceModel>
- <?xml version="1.0" encoding="utf-8" ?>
- <rules xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/rules">
- <constraintRules>
- <rule name="default" enabled="true" rank="1" description="The default constraint rule">
- <actions>
- <range min="1" max="6" target="AutoscalingApplicationRole"/>
- </actions>
- </rule>
- </constraintRules>
- <reactiveRules>
- <rule name="ScaleUpOnHighUtilization" rank="10" description="Scale up the web role" enabled="true" >
- <!--The reactive rule named ScaleUpOnHighUtilization increments the instance count of the target role
- by one if the average CPU utilization over the last five minutes has been greater than or equal to 60%.-->
- <when>
- <any>
- <greaterOrEqual operand="WebRoleA_CPU_Avg_5m" than="60"/>
- </any>
- </when>
- <actions>
- <scale target="AutoscalingApplicationRole" by="1"/>
- </actions>
- </rule>
- <rule name="ScaleDownOnLowUtilization" rank="10" description="Scale up the web role" enabled="true" >
- <!--The reactive rule named ScaleDownOnLowUtilization decrements the instance count of the target role
- by one if the average CPU utilization over the last five minutes has been less than 60%.-->
- <when>
- <all>
- <less operand="WebRoleA_CPU_Avg_5m" than="60"/>
- </all>
- </when>
- <actions>
- <scale target="AutoscalingApplicationRole" by="-1"/>
- </actions>
- </rule>
- </reactiveRules>
- <operands>
- <!--Both reactive rules use an operand named WebRoleA_CPU_Avg_5m that calculates the average CPU usage over
- the last five minutes for a Windows Azure role named AutoscalingApplicationRole.
- This role is defined in the service model-->
- <performanceCounter alias="WebRoleA_CPU_Avg_5m"
- performanceCounterName="\Processor(_Total)\% Processor Time"
- source ="AutoscalingApplicationRole"
- timespan="00:05:00" aggregate="Average"/>
- </operands>
- </rules>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement