Search code examples
amazon-web-servicesamazon-ec2elastic-load-balancer

EC2 instances removed from load balancer


Is there any event that could cause an EC2 instance to be removed from an ELB in AWS?

We have 4 services in a load balancer that usually chug away doing their thing, being updated only very occasionally. We've had issues from time to time where some of the instances would choke and need to be restarted, but they'd still be in the load balancer, simply listed as OutOfService.

However, today, we checked and found only 1 instance listed in the load balancer (as in completely removed, not OutOfService). The other 3 were healthy and the health check URL was returning a 200 status code. There's only two of us with access to the account so it definitely wasn't done manually.

Is there anything that could've caused the instances to be removed from the load balancer?


Solution

  • In this specific instance, the issue was caused by our deployment process taking machines out of the load balancer when deploying (i.e. doing a blue-green deployment). When a deployment issue occurred, the nodes wouldn't be added back into the load balancer.