3

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

greybeard
  • 2,249
  • 8
  • 30
  • 66
Nikhil G P
  • 33
  • 5
  • Having others do you assignments hopefully gets you nowhere: [Show what you tried, where specifically you are stuck](http://meta.stackexchange.com/questions/10811/how-do-i-ask-and-answer-homework-questions). – greybeard Jun 20 '21 at 05:21
  • How did it go? Still unclear what you can do? – Marcin Jun 21 '21 at 01:31
  • @Marcin i was able to configure cpu/memory utilisation using terraform with the solutions you gave, there was a specific module for the same, but couldnt get idea about the second one. – Nikhil G P Jun 21 '21 at 03:42
  • 1
    For the second one you need load balancer associated with your ECS service. – Marcin Jun 21 '21 at 03:43

1 Answers1

0

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.

Marcin
  • 215,873
  • 14
  • 235
  • 294