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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南