Skip to content

Commit

Permalink
[no ticket] Use higher ASG targets (#3044)
Browse files Browse the repository at this point in the history
## Context

At 50% memory, the frontend hits that memory cap easily and immediately
gets cycled out. I wasn't really expecting this behavior, but you live
and you learn.

## Changes proposed

Increases the memory target to 99%, so nextjs only spins up new
containers when after containers max out their cache. This won't
meaningfully impact the backend, because the because the backend doesn't
have an infinitely* scaling cache.

\* There's not significant indication that the nextjs cache is
infinitely scaling. It might just scale higher than our current memory
numbers.

I also increased the CPU target to 75%, which may come back to bite me I
dunno. We'll see.
  • Loading branch information
coilysiren authored Nov 26, 2024
1 parent e504342 commit 8903243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infra/modules/service/autoscaling.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "aws_appautoscaling_policy" "ecs_scale_policy_memory" {
}
scale_in_cooldown = 300
scale_out_cooldown = 5
target_value = 50
target_value = 99
}
}

Expand All @@ -42,6 +42,6 @@ resource "aws_appautoscaling_policy" "ecs_scale_policy_cpu" {
}
scale_in_cooldown = 300
scale_out_cooldown = 5
target_value = 50
target_value = 75
}
}

0 comments on commit 8903243

Please sign in to comment.