sticky vs non-sticky sessions

sticky vs non-sticky sessions

am 30.11.2007 06:01:38 von hassan

Is it best to have your code do sticky or non-sticky sessions ? Can you give
me the pros and cons ?
Also where do you set it ? In the code or at the load balancers or both ?

Thanks

Re: sticky vs non-sticky sessions

am 06.12.2007 23:29:26 von Tiago Halm

Its not the sessions that are sticky, its the load balancing that may
require the TCP sessions to be sticky. In simple words a sticky TCP session
is about making sure all HTTP requests from the same user-agent are routed
to the same WebServer. Since HTTP travels through TCP, its all about making
sure the same source IP is routed to the same WebServer because its the one
where the session was created and is kept in-memory.

Sticky session scenarios are required when doing InProc ASP(X) sessions. For
ASP its the only possible way. For ASP.NET its one of the options. When
using ASP.NET its best way is to have SQL sessions only. That way you not
eliminate single point of failure of the sessions storage (using a SQL
Cluster), and can configure the load balancer (NLB) for pure round robin or
any other mode of your choosing.

Tiago Halm

"Hassan" wrote in message
news:%23qOxm4wMIHA.5244@TK2MSFTNGP03.phx.gbl...
> Is it best to have your code do sticky or non-sticky sessions ? Can you
> give me the pros and cons ?
> Also where do you set it ? In the code or at the load balancers or both ?
>
> Thanks
>