Skip to content

Commit

Permalink
Increase io-be instances (#946)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Grillo <andrea.grillo@pagopa.it>
  • Loading branch information
gquadrati and Krusty93 authored Apr 15, 2024
1 parent 0933ac8 commit 6121717
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions src/core/app_backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ resource "azurerm_monitor_autoscale_setting" "appservice_app_backendl1" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand All @@ -782,7 +782,7 @@ resource "azurerm_monitor_autoscale_setting" "appservice_app_backendl1" {
metric_namespace = "microsoft.web/serverfarms"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 40
Expand All @@ -793,7 +793,7 @@ resource "azurerm_monitor_autoscale_setting" "appservice_app_backendl1" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand Down Expand Up @@ -991,7 +991,7 @@ resource "azurerm_monitor_autoscale_setting" "appservice_app_backendl2" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand All @@ -1002,7 +1002,7 @@ resource "azurerm_monitor_autoscale_setting" "appservice_app_backendl2" {
metric_namespace = "microsoft.web/serverfarms"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 40
Expand All @@ -1013,7 +1013,7 @@ resource "azurerm_monitor_autoscale_setting" "appservice_app_backendl2" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/core/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ ehns_metric_alerts = {
function_app_kind = "Linux"
function_app_sku_tier = "PremiumV3"
function_app_sku_size = "P1v3"
function_app_autoscale_minimum = 1
function_app_autoscale_minimum = 3
function_app_autoscale_maximum = 30
function_app_autoscale_default = 10

Expand All @@ -214,7 +214,7 @@ function_services_autoscale_default = 10
function_app_async_kind = "Linux"
function_app_async_sku_tier = "PremiumV3"
function_app_async_sku_size = "P1v3"
function_app_async_autoscale_minimum = 2 # 2 instance to achieve redundancy and failover
function_app_async_autoscale_minimum = 3 # 2 instance to achieve redundancy and failover
function_app_async_autoscale_maximum = 30
function_app_async_autoscale_default = 10

Expand All @@ -235,7 +235,7 @@ function_public_autoscale_maximum = 30
function_public_autoscale_default = 10

app_backend_autoscale_default = 10
app_backend_autoscale_minimum = 3
app_backend_autoscale_minimum = 4
app_backend_autoscale_maximum = 30

# Function CDN Assets
Expand Down
2 changes: 1 addition & 1 deletion src/core/function_app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ resource "azurerm_monitor_autoscale_setting" "function_app" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/core/function_app_async.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ resource "azurerm_monitor_autoscale_setting" "function_app_async" {
metric_namespace = "microsoft.web/sites"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 3000
Expand All @@ -170,7 +170,7 @@ resource "azurerm_monitor_autoscale_setting" "function_app_async" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand All @@ -181,7 +181,7 @@ resource "azurerm_monitor_autoscale_setting" "function_app_async" {
metric_namespace = "microsoft.web/serverfarms"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 45
Expand All @@ -192,7 +192,7 @@ resource "azurerm_monitor_autoscale_setting" "function_app_async" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/domains/citizen-auth-app/04_function_lollipop.tf
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ resource "azurerm_monitor_autoscale_setting" "function_lollipop" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand All @@ -223,7 +223,7 @@ resource "azurerm_monitor_autoscale_setting" "function_lollipop" {
metric_namespace = "microsoft.web/serverfarms"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 45
Expand All @@ -234,7 +234,7 @@ resource "azurerm_monitor_autoscale_setting" "function_lollipop" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/domains/citizen-auth-app/07_function_fast_login.tf
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ resource "azurerm_monitor_autoscale_setting" "function_fast_login" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand All @@ -237,7 +237,7 @@ resource "azurerm_monitor_autoscale_setting" "function_fast_login" {
metric_namespace = "microsoft.web/serverfarms"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 45
Expand All @@ -248,7 +248,7 @@ resource "azurerm_monitor_autoscale_setting" "function_fast_login" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/domains/citizen-auth-app/env/weu-prod01/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ cidr_subnet_fnlollipop = ["10.0.17.0/26"]
function_lollipop_kind = "Linux"
function_lollipop_sku_tier = "PremiumV3"
function_lollipop_sku_size = "P1v3"
function_lollipop_autoscale_minimum = 2
function_lollipop_autoscale_minimum = 4
function_lollipop_autoscale_maximum = 20
function_lollipop_autoscale_default = 10

# Functions Fast Login
cidr_subnet_fnfastlogin = ["10.0.17.128/26"]
function_fastlogin_kind = "Linux"
function_fastlogin_sku_size = "P1v3"
function_fastlogin_autoscale_minimum = 2
function_fastlogin_autoscale_minimum = 4
function_fastlogin_autoscale_maximum = 20
function_fastlogin_autoscale_default = 10
8 changes: 4 additions & 4 deletions src/domains/ioweb-app/06_function_ioweb_profile.tf
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ resource "azurerm_monitor_autoscale_setting" "function_ioweb_profile" {
metric_namespace = "microsoft.web/sites"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 3000
Expand All @@ -245,7 +245,7 @@ resource "azurerm_monitor_autoscale_setting" "function_ioweb_profile" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand All @@ -256,7 +256,7 @@ resource "azurerm_monitor_autoscale_setting" "function_ioweb_profile" {
metric_namespace = "microsoft.web/serverfarms"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 45
Expand All @@ -267,7 +267,7 @@ resource "azurerm_monitor_autoscale_setting" "function_ioweb_profile" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/domains/ioweb-app/env/weu-prod01/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cidr_subnet_fniowebprofile = ["10.0.117.0/24"]
function_ioweb_profile = {
kind = "Linux"
sku_size = "P1v3"
autoscale_minimum = 1
autoscale_minimum = 2
autoscale_maximum = 30
autoscale_default = 1
autoscale_default = 2
}
8 changes: 4 additions & 4 deletions src/domains/messages-app/10_function_messages.tf
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ resource "azurerm_monitor_autoscale_setting" "app_messages_function" {

capacity {
default = 10
minimum = 1
minimum = 3
maximum = 15
}

Expand All @@ -259,7 +259,7 @@ resource "azurerm_monitor_autoscale_setting" "app_messages_function" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand All @@ -270,7 +270,7 @@ resource "azurerm_monitor_autoscale_setting" "app_messages_function" {
metric_namespace = "microsoft.web/serverfarms"
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_window = "PT1M"
time_aggregation = "Average"
operator = "GreaterThan"
threshold = 45
Expand All @@ -281,7 +281,7 @@ resource "azurerm_monitor_autoscale_setting" "app_messages_function" {
direction = "Increase"
type = "ChangeCount"
value = "2"
cooldown = "PT5M"
cooldown = "PT1M"
}
}

Expand Down

0 comments on commit 6121717

Please sign in to comment.