Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The stickiness of an elastic load balancer can be set to one of three options

  1. Disable Stickiness
  2. Enable Load Balancer Generated Cookie Stickiness
  3. Enable Application Generated Cookie Stickiness

What are the differences between 2) and 3)?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Both options are going to rely on HTTP cookies to make sure that each session continues to hit the same instance.

However, with option 2 (Load Balancer Generated Cookie), the EC2 load balancer will insert it's own cookie into the HTTP transaction with a specified expiration period. With Option 3 (Application Generated Cookie), you can have the load balancer check for cookies that you are already creating with your web app (like a PHP session ID) and the expiration period of the load balancer cookie will match that one.

With the 3rd option, you have some control over how the cookie expires allowing the session to move to a different instance, but with the 2nd option, your application doesn't need to be creating any cookies.

More information on this feature:

share|improve this answer

Im using PHP sessions without an expiration period so what happens to the sticky session on the load balancer?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.