2 Answers
- Newest
- Most votes
- Most comments
1
- Check ALB Health Check Configuration: Verify the health check path and settings. Adjust health check intervals and thresholds for quicker detection of failures.
- Enable "Stickiness Cookie Expiration": Set a cookie expiration time to periodically re-evaluate sticky sessions.
- Use a Custom Stickiness Cookie: Consider using a custom stickiness cookie for more control over session routing.
- Session Timeout Handling: Ensure the application can handle session timeouts and re-establish sessions on new servers.
- Application-Level Session Management: Use a centralized session store (e.g., Amazon ElastiCache) to manage sessions across servers.
- Deploy More Resilient Instances: Ensure sufficient instances in the target group to handle failover.
- Automated Instance Replacement: Use AWS Auto Scaling to automatically replace unhealthy instances.
1
Hi there,
Based on the documentation, both duration & application based stickiness will route the traffic to a new target if the existing target becomes unhealthy. Can you check if your ALB health check is properly configured? It can be caused by properties like HealthCheckIntervalSeconds and UnhealthyThresholdCount to cause delays in switching to the new target.
"If the cookie is present but cannot be decoded, or if it refers to a target that was deregistered or is unhealthy, the load balancer selects a new target and updates the cookie with information about the new target."
answered 3 months ago
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Thanks for your reply. Regarding your points: