Search code examples
amazon-web-servicesload-balancingamazon-elb

AWS load balancing


When we define AWS load balancers, we define various components like listeners, rules, conditions, target groups.

A target group contains multiple resources, like EC2 instances. Load balancer maps incoming requests to target groups based on rules and conditions. But as we have multiple instances in a target group, so how is traffic load balanced within a target group.

Do we have to define load balancers for target groups too


Solution

  • AWS does load balancing for all healthy instances in a target group. The algorithm by default is round robin. You can change Target Group Attribute load_balancing.algorithm.type to round_robin or least_outstanding_requests. See more doc