- Newest
- Most votes
- Most comments
Even if there is no healthy target in the target group, ALB keeps forwarding to the target group due to the stickiness and this will result in 503 errors. This will persists until sticky session expires. On thing to understand here is with the ALB is that Application stickiness can detect the target failure, but it will not work with weighted routing. Stickiness takes precedence over adjusting Weight.
There is No automatic redirection feature exists and cookie must be manually reset or timeout. This is expected behavior for duration-based stickiness ALB does not have feature to reset the duration-based stickiness unless resetting the cookie manually or stickiness duration time out.
Best Practice: For blue-green deployments with ALB, carefully coordinate stickiness duration with your deployment timeline or implement application-level handling of connection failures.
As mentioned in previous comments, this is the default behaviour of ALB. You can, however, reduce the "sticky" time to 5 minutes instead of an hour, thus shortening the downtime.
Alternatively, you can use listener rules like path-based or header-based routing and forward traffic to the desired target groups. You will get more control over the traffic redirection in this way.
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-update-rules.html
Relevant content
- asked a year ago
- asked 9 months ago
- asked a year ago