Load Balancing



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
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

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?

<sessionState mode="SQLServer"
Security=SSPI;data source=mySessionServer;"

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question