I have a problem statement. Can anyone answer it for me.
You have a Microservice running in your ECS cluster.
How would you manage below tasks. (Use terraform)
a. You want to scale in/out the tasks based on CPU/Memory utilisation
b. You want to scale in/out the tasks based on the requests made to the service
Scaling of ECS services on Fargate is explained in:
a.You want to scale in/out the tasks based on CPU/Memory utilisation
You use ECSServiceAverageCPUUtilization
or ECSServiceAverageMemoryUtilization
.
b.You want to scale in/out the tasks based on the requests made to the service
You use ALBRequestCountPerTarget
.