我在 Windows Azure 上有一个托管服务,我正在尝试使用 Wasabi Azure 规则来影响缩放,但是我的规则没有得到执行。我的 rules.xml 和 serviceinformation-store.xml 都已上传到我的自动缩放 Azure 存储容器。这是我的 rules.xml
<rules xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/rules" enabled="true">
<constraintRules>
<rule name="default" enabled="true" rank="1" description="The default constraint rule">
<timetable startDate="2012-11-05" startTime="05:34:00" utcOffset="-07:00" duration="02:00:00">
<daily/>
</timetable>
<actions>
<range min = "4" max="4" target="myWebService"/>
</actions>
</rule>
<rule name="ScaledownAtBusinessClose" enabled="true" rank="1" description="Scale down after hours">
<timetable startDate="2012-11-02" startTime="10:25:00" utcOffset="-07:00" duration="02:00:00">
<daily/>
</timetable>
<actions>
<range min ="1" max="1" target="myWebService" />
</actions>
</rule>
</constraintRules>
</rules>
这是我的服务信息存储
<serviceModel xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel">
<subscriptions>
<subscription name="Windows Azure MSDN - Visual Studio Ultimate" subscriptionId="<myid>" certificateThumbprint= "<mythumbprint>" certificateStoreName="My" certificateStoreLocation="CurrentUser" >
<services>
<service dnsPrefix="xxxxxxxxx" slot="Production" scalingMode="Scale">
<roles>
<role alias="myWebService" roleName="myWebService" wadStorageAccountName="<myaccount>"/>
</roles>
</service>
</services>
<storageAccounts>
<storageAccount alias="<myaccount>" connectionString="DefaultEndpointsProtocol=https;AccountName=<acctname>;AccountKey=<accountkey>">
<queues>
</queues>
</storageAccount>
</storageAccounts>
</subscription>
</subscriptions>
</serviceModel>
我从一个实例开始 Web 角色,但在 MST 下午 5:34,托管服务 (myWebService) 无法扩展到 4 个实例。
在项目引用中,我有 Microsoft.WindowsAzure.Diagnostics、Microsoft.WindowsAzure.ServiceRuntime、Microsoft.WindowsAzure.StorageClient