Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple ELBs for a single auto-scaling group

We have multiple SSL certificates for a group of EC2 server (due to legacy constraints). We have multiple ELBs pointing at this group, each terminating the SSL for a specific certificate. We now want to move to auto-scaling instead of a hard-coded list of EC2 instances. Will a single auto-scaling group work with multiple ELBs?

like image 736
Rob Kinyon Avatar asked Oct 30 '13 16:10

Rob Kinyon


2 Answers

Yes it works (we do this since some years). The autoscaling group automatically attaches new instances to each ELB. If you use the command line tools you can create an autoscaling group with multiple ELBs, e.g.:

as-create-auto-scaling-group mygroup ... --load-balancers lb1,lb2,lb3 

Once you've created the group, you cannot update the list of load-balancers. If you want to update the list of ELBs in a group you need to create a new one and delete the replaced one. Simple as that.

like image 92
Dennis Münkle Avatar answered Sep 17 '22 13:09

Dennis Münkle


It should work, but the autoscaling mechanism will only automatically associate your instances with 1 load balancer.

You will need to add some kind of health check scripts which can associate/disassociate instances as your auto scaling group scales up and down. You may be able to run these as start up and showdown scripts on the instances themselves.

like image 38
datasage Avatar answered Sep 21 '22 13:09

datasage