diff --git a/ci/terraform/auto-scaling.tf b/ci/terraform/auto-scaling.tf index 34f9a15e3..1a8253a77 100644 --- a/ci/terraform/auto-scaling.tf +++ b/ci/terraform/auto-scaling.tf @@ -52,9 +52,9 @@ resource "aws_cloudwatch_metric_alarm" "ecs_service_scale_out_alarm" { evaluation_periods = 2 metric_name = "CPUUtilization" namespace = "AWS/ECS" - period = 60 + period = 30 statistic = "Average" - threshold = 60 + threshold = 50 datapoints_to_alarm = 2 dimensions = { @@ -73,9 +73,9 @@ resource "aws_cloudwatch_metric_alarm" "ecs_service_scale_in_alarm" { evaluation_periods = 5 metric_name = "CPUUtilization" namespace = "AWS/ECS" - period = 60 + period = 30 statistic = "Average" - threshold = 60 + threshold = 50 datapoints_to_alarm = 5 dimensions = { @@ -107,29 +107,23 @@ resource "aws_appautoscaling_policy" "frontend_auto_scaling_policy_scale_out" { step_scaling_policy_configuration { adjustment_type = "PercentChangeInCapacity" metric_aggregation_type = "Average" - cooldown = 120 - min_adjustment_magnitude = 5 + cooldown = 60 + min_adjustment_magnitude = 10 step_adjustment { metric_interval_lower_bound = 0 - metric_interval_upper_bound = 20 - scaling_adjustment = 100 + metric_interval_upper_bound = 10 + scaling_adjustment = 300 } step_adjustment { - metric_interval_lower_bound = 20 + metric_interval_lower_bound = 10 metric_interval_upper_bound = 30 - scaling_adjustment = 200 + scaling_adjustment = 400 } step_adjustment { metric_interval_lower_bound = 30 - metric_interval_upper_bound = 35 - scaling_adjustment = 300 - } - - step_adjustment { - metric_interval_lower_bound = 35 scaling_adjustment = 500 } } @@ -146,7 +140,7 @@ resource "aws_appautoscaling_policy" "frontend_auto_scaling_policy_scale_in" { step_scaling_policy_configuration { adjustment_type = "PercentChangeInCapacity" metric_aggregation_type = "Average" - cooldown = 120 + cooldown = 60 min_adjustment_magnitude = 5 step_adjustment { diff --git a/ci/terraform/staging.tfvars b/ci/terraform/staging.tfvars index bb40e5367..5917ce2d2 100644 --- a/ci/terraform/staging.tfvars +++ b/ci/terraform/staging.tfvars @@ -3,11 +3,11 @@ common_state_bucket = "di-auth-staging-tfstate" redis_node_size = "cache.m4.xlarge" frontend_auto_scaling_v2_enabled = true -frontend_task_definition_cpu = 1024 -frontend_task_definition_memory = 2048 -frontend_auto_scaling_min_count = 3 -frontend_auto_scaling_max_count = 60 -ecs_desired_count = 3 +frontend_task_definition_cpu = 512 +frontend_task_definition_memory = 1024 +frontend_auto_scaling_min_count = 4 +frontend_auto_scaling_max_count = 120 +ecs_desired_count = 4 support_language_cy = "1" support_international_numbers = "1" support_account_recovery = "1"