How many Load Balancers of what schemes are actually required while creating an ECS cluster with AutoScaling Via Capacity Provider?

0

Hi All,

I am currently understanding the basics of ECS Auto Scaling and am confused how many load balancers of what schemes ("internal" or "internet-facing") are required to create a cluster which is ASG aware using capacity provider.

If I have configured a load balancer in service (scheme-'internet facing' with target group 'IP address'), Do I need to configure a load balancer in Auto Scaling Group? If Yes, then of what schemeand target group?

My understanding though not tested is when both the load balancers are configured, the LB of ASG, let's say ASG-LB, will be 'internet-facing' with target group of 'instances'. The LB of Service, let's say S-LB, will be 'internal' with target group of 'IP Address'. When a request is send to the cluster, ASG-LB will direct the request of a particular instance depending on the traffic and S-LB will direct the request to a particular task inside of that instance.

I would like to know whether I am correct? If not, then please help me understand how the traffic is routed in the cluster with this two load balancers?

Thanks, Priyam Mehta

1개 답변
0

Thank you for reaching out to AWS!

A single load balancer may distribute traffic to your auto scaling group while accepting traffic from the internet. This can be done by configuring an ELB listener rule and set the ECS auto-scaling group as a target group. Please see the step-by-step guides listed below.

Add listener rule using the console
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html

Create a target group using the console
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html

Additionally, since ELBs scale with demand, you do not need to worry about a single ELB becoming overwhelmed with traffic. More information on this can be found here: https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/what-is-load-balancing.html.

I hope this helps and if you have any more questions, please feel free to reach out!

Julio_A
답변함 2년 전
AWS
지원 엔지니어
검토됨 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인