azure-service-fabric - 为什么服务结构不能在 Azure 门户中使用自动缩放功能进行缩放?
问题描述
我对服务结构集群进行了以下设置:
- 5 个节点(耐久性等级:青铜和可靠性等级:银)
- 相关 VM 规模集 (VMSS) 上的当前平均 CPU 利用率百分比平均约为 14%。
- 每个服务都正确部署,实例计数为 -1。
- 我们使用上述服务的应用程序运行良好。
使用 azure 门户,我尝试为上述 VMSS 设置自动缩放选项(在缩放选项中):
- 使用 CPU 利用率百分比阈值为 10 的横向扩展(从上面看,当前值为 14)。
- 将其配置为在扩展之前等待 5 分钟。
- 其余详细信息显示在下面的 json 中。
{
"location": "eastus",
"tags": {
"$type": "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage"
},
"properties": {
"name": "My Testing",
"enabled": true,
"targetResourceUri": "/subscriptions/MySubScriptionID/resourceGroups/My-RG-Name/providers/Microsoft.Compute/virtualMachineScaleSets/nt1vm",
"profiles": [
{
"name": "Auto created scale condition 1",
"capacity": {
"minimum": "5",
"maximum": "10",
"default": "5"
},
"rules": [
{
"scaleAction": {
"direction": "Decrease",
"type": "ChangeCount",
"value": "1",
"cooldown": "PT5M"
},
"metricTrigger": {
"metricName": "Percentage CPU",
"metricNamespace": "",
"metricResourceUri": "/subscriptions//MySubScriptionID//resourceGroups/My-RG-Name/providers/Microsoft.Compute/virtualMachineScaleSets/nt1vm",
"operator": "LessThan",
"statistic": "Average",
"threshold": 5,
"timeAggregation": "Average",
"timeGrain": "PT1M",
"timeWindow": "PT5M"
}
}
],
"fixedDate": {
"timeZone": "Mountain Standard Time",
"start": "2018-09-18T00:00:00.000Z",
"end": "2018-09-21T23:59:00.000Z"
}
},
{
"name": "Auto created scale condition",
"capacity": {
"minimum": "5",
"maximum": "10",
"default": "5"
},
"rules": [
{
"scaleAction": {
"direction": "Increase",
"type": "ChangeCount",
"value": "1",
"cooldown": "PT15M"
},
"metricTrigger": {
"metricName": "Percentage CPU",
"metricNamespace": "",
"metricResourceUri": "/subscriptions/MySubScriptionID/resourceGroups/My-RG-Name/providers/Microsoft.Compute/virtualMachineScaleSets/nt1vm",
"operator": "GreaterThanOrEqual",
"statistic": "Average",
"threshold": 10,
"timeAggregation": "Average",
"timeGrain": "PT1M",
"timeWindow": "PT5M"
}
}
]
}
],
"notifications": [
{
"operation": "Scale",
"email": {
"sendToSubscriptionAdministrator": false,
"sendToSubscriptionCoAdministrators": false,
"customEmails": [
""
]
},
"webhooks": []
}
],
"targetResourceLocation": "eastus"
},
"id": "/subscriptions/MySubScriptionID/resourceGroups/My-RG-Name/providers/microsoft.insights/autoscalesettings/My Testing",
"name": "My Testing",
"type": "Microsoft.Insights/autoscaleSettings"
}
观察:
- 我等了超过 5 分钟(这是扩展选项的 timeWindow 值)。不会创建新节点。
- 等待 10 分钟、20 分钟和 30 分钟后没有创建新节点。
- 当我在上述 VMSS(在 Scaling 选项中)的 azure 门户中手动将节点数配置为 6(从 5 个)时,会创建节点并且一切都按预期工作。
问题:
- 在上述自动缩放选项的配置中我做错了什么?
解决方案
看来我的规则规模与扩大规则相冲突。一旦我删除了规则中的比例,一切都开始工作了。
推荐阅读
- sql - 递归 CTE 概念混淆
- java - 自定义包装的枚举类型不支持 java.util.TreeSet 集合类型
- ios - 使用 Alamofire 上传图像不成功
- javascript - Firebase 身份验证(电子邮件和密码)未进行身份验证
- javascript - jQuery fileDownload 插件不显示弹出窗口,如何解决这个问题?
- python - PyQt5 使用 runJavaScript 检索表单值
- lyx - 莱克斯。程序列表中某些单词的字母之间的空格
- python-3.x - 如何将二进制 .fits 文件转换为 .csv 文件?
- c# - 触发 HttpClient 的更简单方法(可能没有任务)?
- c# - c# - 以编程方式从 Outlook 电子邮件中删除附件