Per AWS documentation you can attach multiple Load Balancers to a Single Auto Scaling Group. I would think there would be 1:1 relationship between ELB and ASG. If ASG scales which ELB does it update- All. How does this work, what is the use case.
What is an AWS Auto Scaling Group? An AWS Auto Scaling group (ASG) is a fleet of EC2 instances that can scale up or down depending on application demand.
If a scaling action occurs, Amazon EC2 Auto Scaling automatically maintains balance across all of the Availability Zones that you specify. If you're new to Auto Scaling groups, start by creating a launch template or a launch configuration and then use it to create an Auto Scaling group in which all instances have the same instance attributes.
To deploy EC2 instances using Auto Scaling groups, architects must choose between numerous factors such as Amazon Machine Instances (AMIs), EC2 instance types, placement groups, and security considerations. Related to scaling, they also need to consider what the minimum, maximum, and desired capacity would be, and how and when to scale.
The goal of an Auto Scaling Group (ASG) is to: i) Scale-out (addEC2 instances) to match an increased load, ii) Scale in (remove EC2 instances) to match a decreased load, iii) Ensure we have a minimum and a maximum number of machines running, iv) Automatically Register new instances to a load balancer.
Although you can attach, multiple load balancers to a single Auto Scaling group, its rarely being used, specially after AWS introduced Application Load Balancer (ALB) with support for Routing Rules (Domain and Path based) and attaching multiple SSL Certificates for a single load balancer features.
For example few scenarios where it was required previously (Before above mentioned new features were available.)
Looking at the AWS documentation you can attach multiple Load Balancers to an ASG. When the ASG scales up all the Load Balancers will know about the new EC2 instances.
Auto Scaling integrates with Elastic Load Balancing to enable you to attach one or more load balancers to an existing Auto Scaling group. After you attach the load balancer, it automatically registers the instances in the group and distributes incoming traffic across the instances
link to above quote can be found here
In terms of scaling down if one of load balancers is reporting an instance as unhealthy then the instance will be considered unhealthy and eventually terminated.
If you configure your Auto Scaling group to determine health status using both EC2 status checks and Elastic Load Balancing health checks, Auto Scaling considers the instance unhealthy if it fails either the status checks or the health check. Note that if you attach multiple load balancers to an Auto Scaling group, all of them must report that the instance is healthy in order for Auto Scaling to consider the instance healthy. If one load balancer reports an instance as unhealthy, Auto Scaling replaces the instance, even if other load balancers report it as healthy
Link to above quote can be found here
I hope this makes things a bit clearer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With