views:

314

answers:

4

Hi everybody,

I have posted the following question concerning ASP.NET web farms.

http://stackoverflow.com/questions/1816756/how-to-create-an-asp-net-web-farm/

Guys recommended using Network Load Balancing (NLB) as a primary way of creating a web farm.

However, Wikipedia says that "NLBS is intended for ... stateless applications". Our web application, however, is absolutely "stateful": it is a closed site to which users will have access by login and password, and information for every user will be different: people will see their own trades and operations.

Should we still use NLB in this scenario?

Thank you.

A: 

You can still use a NLB, but you need one that supports Sticky Sessions, meaning that it will always route traffic from a certain client to the same web server. Not the best solution in terms of load balancing, but at least allows you to grow to multiple servers.

baldy
A: 

I think load balancing is still desirable. You just need to set it up so sessions are "sticky": once a session is open:

http://technet.microsoft.com/en-us/library/bb734910.aspx

duffymo
A: 

Should we still use NLB in this scenario?

Do not see reasons why not if you follow the guidelines.

The web application is ba nature stateless, so even if your users should log-in it does not make the application stateful.

Couple the things which ARE stateful in ASP.NET are:

  • Session State
  • Cache

which can be configured appropriately in a WebFarm.

Here is an example on how to configure the NLB.

Dmytrii Nagirniak
A: 

Absolutely, yes. There are strategies you can employ to maintain state between servers in your farm. The machineKey settings should be the same for all webservers in your farm so that auth tickets are valid between machines.

http://msdn.microsoft.com/en-us/library/ms998288.aspx#paght000007%5Fwebfarmdeploymentconsiderations

There are a few options for managing session state between your webservers:

http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx

http://support.microsoft.com/kb/311209

spender