Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sticky session

Posted on 2014-11-19
3
Medium Priority
?
259 Views
Last Modified: 2014-11-26
what  I understands is, sticky session is a session which is  located in the central location of the server so that load balancer can be used for the particular user session in switching between the servers. My question is whether sticky session is same as the cookies.. ? what happens if the server goes down ?  did the sticky session stays...

People who have practical knowledge on this  please reply...

Thank you
0
Comment
Question by:roy_sanu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Accepted Solution

by:
dgrafx earned 668 total points
ID: 40455904
For web applications, clustering is a load-balancing technique in which multiple application servers are set up to behave as one big server. Generally this requires replicating HttpSession data across the servers, to ensure that a user's web interactions will continue without interruption regardless of which server handles the next request. Session replication achieves very high reliability, but it incurs an extra performance cost (due to the serializing and deserializing of session data and the extra network traffic required).
In contrast, Sticky Sessions (also called session persistence or sticky persistence) is a load balancing technique in which each session is assigned to a particular server for the duration of the session. This approach doesn't require copying HTTPSession data between servers, so it's very scalable. But if a server goes down, all of its sessions are lost.
In general, the sticky sessions approach is the way to go when possible (that is, when performance is more important than session survival). It represents a much more efficient use of resources ... you are scaling out not up, which is always cheaper. It also means that you don't have to be as careful about what goes into the HTTPSession.

Here is a whole bunch of info: https://support.f5.com/kb/en-us/products/lc_9_x/manuals/product/lc_config_guide_10_1/lc_persist_profiles.html#1184508
0
 
LVL 28

Assisted Solution

by:dpearson
dpearson earned 668 total points
ID: 40456223
Just to augment what dgrafx said which is all correct:

My question is whether sticky session is same as the cookies.. ?

No - cookies are stored in the user's browser.  A session is something that exists on the server.

Also beyond having either session replication or sticky sessions, another option is a hybrid approach.  In that model, the session is always backed by data stored in a database.  If the request is sent to a server, it first checks to see if it has the session in memory and if not loads it from the database.

With this model, if your load balancer supports sticky sessions then you get the performance benefits of sticky sessions (the same server gets all requests and has the session in memory).  However, if the server crashes and the requests need to go to a different server, it will load the session data from the database and proceed.  So then you get failover support as well.  I mention this because it's the approach we take to sessions - seems to give the benefits of both approaches without the weaknesses.

Doug
0
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 664 total points
ID: 40459477
Although a cookie and a session are two different things, application servers use cookies to know which session object is yours.  If you have a J2EE server they typically use a cookie named JSESSIONID for tracking your session id.

Some load balancer use cookies to track which server your session is currently associated with.

So cookies and sessions are different, but cookies are used to identify your session.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question