Groups | Blog | Home
all groups > asp.net > march 2006 >

asp.net : Load Balancing


RahulBose
3/28/2006 11:03:16 PM
I am trying to implement Load Balancing but facing some problems:

A Web farm usually consists of 2 or more computers, orchestrated by
some form of load balancing. Consider my scenario:

1. I have an Intranet site say www.intranet.com
2. I arrive at a load balancing machine
3. This machine redirectes me to the machine WebServer01 (contents from
www.01.intranet.com are shown)
4. I request another page, for example
www.intranet.com/reports/misreports.asp
5. The load balancer can send me to WebServer2, or WebServer3 or
wherever it wants for my new request.

The problem which I face is as soon as the load balancer transfers me
to another web server the session times out. I have set the machine
keys i.e. Validation and decryption keys across all Web Servers. I am
using the "SHA1" algorithm for validation and All these machines should
be able to read the same cookies, meant for intranet.com, but currently
its not doing so, I am really confussed now. Can anyone help me out
with this.
Jason Hales
3/29/2006 3:33:05 AM
You've set the set the <machinekey> in Web.config to be the same value
on all Web servers, I assume you're also using SQLServer mode for your
session state?


<system.web>
<sessionState mode="SQLServer"
sqlConnectionString="Integrated
Security=SSPI;data source=mySessionServer;"
cookieless="false"
timeout="20"/>
</sessionState>
</system.web>
RahulBose
3/29/2006 9:33:38 AM
Hi Jason I am not using SQL Server mode, I am trying to achive web farm
through cookies.

Reference for the same is:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000007.asp
AddThis Social Bookmark Button