- Newest
- Most votes
- Most comments
If a target group contains only unhealthy registered targets, the load balancer routes requests to all those targets, regardless of their health status. This means that if all targets fail health checks at the same time in all enabled Availability Zones, the load balancer fails open. The effect of the fail-open is to allow traffic to all targets in all enabled Availability Zones, regardless of their health status, based on the load balancing algorithm : https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html
To avoid this scenario you might want to deploy a different logic of LB using a non-spot baseline : https://aws.amazon.com/blogs/compute/running-web-applications-on-amazon-ec2-spot-instances/
That IS the expected flow. Your weighted routing policy is still sending 80% of your traffic to the spot target group, even when empty. The simplest fix would probably be to create a new launch template that puts your spot instances in an auto-scaling-group. You can use a mixed-instance policy in the ASG to make sure not all of your spot fleet is stopped at once.
Relevant content
- asked 5 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 years ago