- Newest
- Most votes
- Most comments
There are different mechanisms for each service that are asynchronous from each other. Because they run on different
ALB
- You set the interval and consecutive unhealthy values. Together these determine how long it will take for an instance to show as unhealthy on the ALB itself. As soon as its marked unhealthy here, the ALB will stop sending new requests to the instance (unless all targets in that target group are unhealthy, and then it will fail open)
ASG
- AutoScaling has a separate internal interval where it checks to see if an instance is unhealthy or not by looking at the instances status in EC2 and on any load balancers (if ELB healthchecks are enabled on the ASG)
- The next time the ASG healthcheck happens after your ALB marks the instance unhealthy, the ASG will then mark it unhealthy. The ASG healthcheck interval is not configurable
- The next ASG launch/terminate cycle will then lead to the instance being replaced
Amazon EC2 Auto Scaling checks that all instances within the Auto Scaling group are running and in good shape by periodically checking the health state of the instances.(1)
(1) https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#determine-instance-health
I've reached out to our internal docs team asking to make this line in the ELB section (right below the above mentioned line) a bit more explicit about these 2 asynchronous timers. If there's any other sections/docs you feel could be improved around this topic you can either comment here and I'll pass it on; or click the 'feedback' button on a given doc, which sends your feedback directly to the document team that works on that service.
you can configure the group to mark an instance as unhealthy when Elastic Load Balancing reports it as unhealthy
Relevant content
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
Thank you for your help. I appreciate it.