0

For a ECS service with launch type "fargate", it is possible to configure a load balancer and auto scaling. I don`t understand, how those two types of scaling work in this case, and how they work together.

My example
I define a task, and set the task size to "0.25 vCPU". I then configure the service to use a load balancer, and auto scaling. I set the auto scaling to a maximum number of 4 tasks.

My questions

  1. I would expect, that the task is executed with 0.25 vCPU. When the task runs out of CPU, it starts another one, which uses another 0.25 vCPU. This is done until the maximum number of tasks is reached, this means a use and costs of 1vCPU in my example. Is this expectation correct?
  2. What is the role of the load balancer? As I understand it, it is just needed for routing and https certfificate. Or does it play a role at scaling, too?
  3. When I want to scale container based, then I need an own task definition for every container, right? And an own load balancer for every service? Is it possible to use one load balancer for multiple services?

In which AWS docs I can read about those topics?

1

Load balancing will route the requests across tasks while autoscaling will increase or decrease the number of tasks based on the traffic.

starting new tasks when cpu threshold exceed is autoscaling, this can be setup with cloudwatch events.

you can load balance services based on rules and then route them to target groups. read here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.