I have a solution where an ELB is configured to use sticky sessions. How can I actually verify that requests for a client is actually routed to one and the same instance in the auto-scaling group behind the ELB?
Asked
Active
Viewed 1,557 times
2
-
1Have you enabled Load Balancer or Application Generated Cookie Stickiness on the ELB? – gboda Feb 10 '16 at 21:31
-
At the moment it's configured to use duration-based session stickiness but I'm not sure if I will use that or switch to use application-controlled session stickiness. – Christian Feb 10 '16 at 21:54
2 Answers
2
For web applications, in my dev/testing environments, I usually grab the instance-id using the EC2 meta data service and spit it out in the HTML. That way I can see what instance is serving my request.
Other than that, to my knowledge there is no way to verify sticky sessions are working unless you log session ids and all requests and check through all of your logs across each of the relevant instances.

mickzer
- 5,958
- 5
- 34
- 57
2
ELB access logs contain both the requesting client's and the backend instance's IP.

gboda
- 1,426
- 1
- 10
- 6