WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Session Persistence VS Session affinity VS sticky session

  • 1.  Session Persistence VS Session affinity VS sticky session

    Posted Tue September 13, 2016 08:04 AM

    Hi All.

    Can anybody help me in understading difference between Session Persistence ,Session affinity , sticky session with an example to understand it in a

    better way..

    And which level it can be achieved like Session Persistence can be acheived from load balancer or web server or application server level same like Session

    affinity and sticky session.

     

     

     

    kalyan.



  • 2.  RE: Session Persistence VS Session affinity VS sticky session

    Posted Wed September 14, 2016 12:25 PM

    Here is my take on the the three.  They are all completely separate functions / events.

    Session Persistance happens at the application server level and is acheived by using memory to memory replication.  Your active session is replicated in memory to all application servers cluter members.  If you loose a node from your cluster your request will be served by another cluster member.  This is session persistance.  (memory to memry replication is only one way to acheive session persistance)

    Session Affinity is the funtion of maintaining the same connection from a particular web server to a particular application server and maintaining that connection for the length of the session.  This is usefull if you do not have memory to memory relication enabled.  It keeps your session alive on the application server that has your session information.

    Sticky Session is a function performed be a load balancer.  How the initial connection is established can be based upon many different criteria.  After that initial connection is made all subsequent requests for the length of the session are sent to the exact same node as long as ot is active.  That is a sticky session