我有一個應用程序的服務計劃,它可以擴展以下面的方式:天青自動縮放古怪行爲
- 範圍:2-20實例
- CPU> 20%:分至20個實例
- CPU < 15%:規模至2個
,我看到隨着時間的推移實例的實際數量如下:
-
個
- 20個實例
- (CPU〜0%)
- 規模下降到2個實例
- (負載開始:CPU> 50%)
- 高達20個實例(在〜5分鐘)
- (負載完成:CPU〜0%)
- 到15個實例(在〜5分鐘)
- 至12個實例(在〜5分鐘)
- 降至5個實例(在〜5分鐘)
- 下降至2個(中〜5分鐘)
如何使它擴展至2個瞬間,沒有之間,額外的步驟?
此外,有時,從2到20個實例的規模上升失敗,並且2個實例保持在巨大負載下。是否有可能告訴Azure儘可能擴展到更多的實例,而不是在巨大的負載下將2個實例留給用戶?
更新:添加比例設置JSON。
更新:添加比例設置截圖。
{
"id": "...",
"name": "...",
"type": "Microsoft.Insights/autoscaleSettings",
"location": "westus",
"tags": {
"$type": "...",
"...": "Resource"
},
"properties": {
"profiles": [
{
"name": "Default",
"capacity": {
"minimum": "2",
"maximum": "20",
"default": "2"
},
"rules": [
{
"metricTrigger": {
"metricName": "CpuPercentage",
"metricNamespace": "",
"metricResourceUri": "...",
"timeGrain": "PT1M",
"statistic": "Average",
"timeWindow": "PT5M",
"timeAggregation": "Maximum",
"operator": "GreaterThan",
"threshold": 20
},
"scaleAction": {
"direction": "Increase",
"type": "ExactCount",
"value": "20",
"cooldown": "PT1M"
}
},
{
"metricTrigger": {
"metricName": "CpuPercentage",
"metricNamespace": "",
"metricResourceUri": "...",
"timeGrain": "PT1M",
"statistic": "Average",
"timeWindow": "PT5M",
"timeAggregation": "Average",
"operator": "LessThan",
"threshold": 15
},
"scaleAction": {
"direction": "Decrease",
"type": "ExactCount",
"value": "2",
"cooldown": "PT1M"
}
}
]
}
],
"enabled": true,
"name": "...",
"targetResourceUri": "...",
"notifications": [
{
"operation": "Scale",
"email": {
"sendToSubscriptionAdministrator": false,
"sendToSubscriptionCoAdministrators": false,
"customEmails": [
"..."
]
},
"webhooks": null
}
]
}
謝謝,我已經閱讀過此材料。 問題實際上是關於 - 爲什麼Azure會根據配置進行縮放。在配置中,它可以是2個實例或20個。實際上 - 顯示其他數字。 –
這可能是多個政策和規則的衝突問題。 –
那麼,我必須規則:一個設置爲20個實例,另一個設置爲2個實例。沒有規則可以添加/刪除N個實例,只有這兩個規則。我不明白他們怎麼會發生衝突,以至於我得到15個例子。 –