Skip to content

Commit

Permalink
AUT-1983 Changing Step scale no for staging perf test (#1334)
Browse files Browse the repository at this point in the history
* Changing Step scale no for staging
  • Loading branch information
pskushwaha1 authored Feb 5, 2024
1 parent 14dee0a commit c81a7fd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
28 changes: 11 additions & 17 deletions ci/terraform/auto-scaling.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand Down Expand Up @@ -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
}
}
Expand All @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions ci/terraform/staging.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c81a7fd

Please sign in to comment.