From adb8a964297434836490cddf773515b68f323fd0 Mon Sep 17 00:00:00 2001 From: Luca Cavallaro Date: Thu, 4 Apr 2024 18:31:19 +0200 Subject: [PATCH] [IOCOM-1128] Update scaling rules of messages functions (#902) --- src/domains/messages-app/07_function_pushnotif.tf | 6 +++--- src/domains/messages-app/10_function_messages.tf | 6 +++--- src/domains/messages-app/11_function_cqrs.tf | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/domains/messages-app/07_function_pushnotif.tf b/src/domains/messages-app/07_function_pushnotif.tf index 270bd251d..b1f6cc734 100644 --- a/src/domains/messages-app/07_function_pushnotif.tf +++ b/src/domains/messages-app/07_function_pushnotif.tf @@ -253,7 +253,7 @@ resource "azurerm_monitor_autoscale_setting" "push_notif_function" { metric_namespace = "microsoft.web/sites" time_grain = "PT1M" statistic = "Average" - time_window = "PT5M" + time_window = "PT1M" time_aggregation = "Average" operator = "GreaterThan" threshold = 3000 @@ -297,7 +297,7 @@ resource "azurerm_monitor_autoscale_setting" "push_notif_function" { metric_namespace = "microsoft.web/sites" time_grain = "PT1M" statistic = "Average" - time_window = "PT5M" + time_window = "PT15M" time_aggregation = "Average" operator = "LessThan" threshold = 2000 @@ -308,7 +308,7 @@ resource "azurerm_monitor_autoscale_setting" "push_notif_function" { direction = "Decrease" type = "ChangeCount" value = "1" - cooldown = "PT20M" + cooldown = "PT10M" } } diff --git a/src/domains/messages-app/10_function_messages.tf b/src/domains/messages-app/10_function_messages.tf index 5aafd636c..8cb1ec601 100644 --- a/src/domains/messages-app/10_function_messages.tf +++ b/src/domains/messages-app/10_function_messages.tf @@ -248,7 +248,7 @@ resource "azurerm_monitor_autoscale_setting" "app_messages_function" { metric_namespace = "microsoft.web/sites" time_grain = "PT1M" statistic = "Average" - time_window = "PT5M" + time_window = "PT1M" time_aggregation = "Average" operator = "GreaterThan" threshold = 3000 @@ -292,7 +292,7 @@ resource "azurerm_monitor_autoscale_setting" "app_messages_function" { metric_namespace = "microsoft.web/sites" time_grain = "PT1M" statistic = "Average" - time_window = "PT5M" + time_window = "PT15M" time_aggregation = "Average" operator = "LessThan" threshold = 2000 @@ -303,7 +303,7 @@ resource "azurerm_monitor_autoscale_setting" "app_messages_function" { direction = "Decrease" type = "ChangeCount" value = "1" - cooldown = "PT20M" + cooldown = "PT10M" } } diff --git a/src/domains/messages-app/11_function_cqrs.tf b/src/domains/messages-app/11_function_cqrs.tf index 1b2c7d22a..754428d56 100644 --- a/src/domains/messages-app/11_function_cqrs.tf +++ b/src/domains/messages-app/11_function_cqrs.tf @@ -304,7 +304,7 @@ resource "azurerm_monitor_autoscale_setting" "function_messages_cqrs" { metric_namespace = "microsoft.web/sites" time_grain = "PT1M" statistic = "Average" - time_window = "PT5M" + time_window = "PT1M" time_aggregation = "Average" operator = "GreaterThan" threshold = 3500 @@ -348,7 +348,7 @@ resource "azurerm_monitor_autoscale_setting" "function_messages_cqrs" { metric_namespace = "microsoft.web/sites" time_grain = "PT1M" statistic = "Average" - time_window = "PT5M" + time_window = "PT15M" time_aggregation = "Average" operator = "LessThan" threshold = 2500 @@ -359,7 +359,7 @@ resource "azurerm_monitor_autoscale_setting" "function_messages_cqrs" { direction = "Decrease" type = "ChangeCount" value = "1" - cooldown = "PT20M" + cooldown = "PT10M" } }