Take the 2-minute tour ×
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

1 Answer 1

up vote 3 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:

  1. http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html
  2. http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/APIReference/API_CreateAppCookieStickinessPolicy.html
share|improve this answer

Your Answer

 
discard

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.