- Newest
- Most votes
- Most comments
There could be several reasons why your Target Group Stickiness is not working as expected. Here are some potential causes and troubleshooting steps:
-
Health Check Issues: If a target becomes unhealthy, the load balancer will route traffic to a new target and update the stickiness cookie. Verify that your targets are passing health checks consistently.
-
Cookie Configuration: Ensure that the stickiness cookie is properly configured. Check if you're using duration-based or application-based stickiness, and verify the settings.
-
Cross-Zone Load Balancing: If cross-zone load balancing is turned off, it might affect stickiness. Ensure this setting aligns with your requirements.
-
Client IP Changes: If clients are behind a proxy or on mobile networks that frequently change IP addresses, it can impact source IP-based stickiness.
-
Cookie Expiration: If you've set a short expiration time for the stickiness cookie, it may cause new cookies to be generated frequently.
-
Browser Behavior: Some browsers, like recent versions of Google Chrome, may handle third-party cookies differently, which could affect stickiness cookies.
To troubleshoot:
- Check your Application Load Balancer (ALB) and target group configurations in the AWS console.
- Verify health check settings and ensure targets are consistently healthy.
- Review your application code to ensure it's not interfering with the stickiness cookies.
- Enable ALB access logs to gain insights into how requests are being routed.
- Test with different browsers and client scenarios to isolate any client-side issues.
If the issue persists after checking these items, you may need to contact AWS support for further assistance, as there could be an underlying issue with the load balancer configuration that requires deeper investigation.
Sources
Troubleshoot stickiness issues on your Network Load Balancer | AWS re:Post
AWS Application Load Balancer, sticky sessions, and failover | AWS re:Post
ALB Target Group Stickiness Cookie on Google Chrome causing "ERR_TOO_MANY_REDIRECTS" | AWS re:Post
Relevant content
- asked a year ago
Each requests are generating new cookies
hi, in your question "enabled target group attribute stickiness for an application" and "Each requests are generating new cookies"
Can you confirm if the stickiness type is lb_cookie or app_cookie ?
CLI:- > aws elbv2 describe-target-group-attributes \ --target-group-arn <your-target-group-arn>