Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
West Wind WebSurge - Rest Client and Http Load Testing for Windows

Load Balancing for ASP.NET


:P
On this page:

I'm working on a couple of ASP.NET projects that have needs for Load Balancing, one of which has the potential to go 'really' big in terms of hitting extremely high loads that would almost certainly require a pool of at least 10 front Web Servers to handle.

 

Over the years I've worked with a few clients that have needed load balancing and we've usually resorted to Network Load Balancing in Windows 2000 and then 2003 later. NLB works well once configured right, but it is a bitch to get it set up and working correctly in the first place, or keep it working when hardware or configurations change. NLB is software driven and while it works well performance wise (about a 1.7 load factor ratio addition per added machine) the configuration is horrendously finicky.

 

I've had more than a couple of installation where no matter what was tried the cluster didn't want to work until we plugged in different network cards or sometimes even switched the order in which servers are accessed in the pool even though both cards were on the supported hardware list. Even in my office test environment I had problems at times getting two machines to converge that had previously converged just fine a few months earlier with the machines essentially unchanged. Each time it takes a fair amount of time to coerce the machines back into operation as a cluster.

 

Since it comes with Win2003 now, NLB is a fairly inexpensive solution, which is why it's attractive to customers, but the maintenance aspect really bites. In the end, on most of those installations I'd done I get called on from time to time to 'tweak' or fix the NLB cluster.

 

It's been quite some time since I've worked with other load balancing software (last I used was back in 1997 with Surplus Direct/Egghead) – I imagine things have changed a bit…

 

So… what are other folks doing for large load balancing scenarios with ASP.NET applications and what has been your experience with these products?  I'd also be interested in hearing about using NLB in large server count Web farms.


The Voices of Reason


 

Pepe Llopis
January 19, 2006

# re: Load Balancing for ASP.NET

I've mounted some big installations of five or more servers with NLB and you are right... it's a bitch!!

Buy a hardware balancer, it's more expensive but it works very well


Pepe Llopis
January 19, 2006

# re: Load Balancing for ASP.NET

And my next project is a PKI authority with... some servers in NLB (and some MSCS and virtual servers). I'm thinking how to include some hardware load balancers into the budget.

pj
January 19, 2006

# re: Load Balancing for ASP.NET

www.scaleoutsoftware.com

Rick Strahl
January 19, 2006

# re: Load Balancing for ASP.NET

Scale Out Software doesn't provide any load balancing tools or hardware. They provide a solution for saving session and cache state in Web farm environments. Useful if needed, but not really in this context...

Ryan Heath
January 19, 2006

# re: Load Balancing for ASP.NET

We are using NLB with 8 servers (and that will increase shortly).

But what I really hate is that I cannot always configure all servers from just one server. For some reason it cannot find/connect to the other servers, while the NLB is working very good.

// Ryan

Pepe Llopis
January 19, 2006

# re: Load Balancing for ASP.NET

to decide you can look here:
http://www.macromedia.com/devnet/server_archive/articles/choosing_hardware_lbdevice.html

But F5 are my preferred, and Zeus company has a very interesting, good price quality relation, product.

Pepe Llopis
January 19, 2006

# re: Load Balancing for ASP.NET

I use application Center to have a centralized console of the system.

Pepe Llopis
January 19, 2006

# re: Load Balancing for ASP.NET

And is very important to correct configure the unicast/multicast, switch, etc.... or you can have problems like the one described on this link:

http://support.microsoft.com/kb/247297/en-us


Benjamin Siegel
January 20, 2006

# re: Load Balancing for ASP.NET

Hi Rick,

When we were testing our WebConnection (file basd app) at Microsoft a while back, we had very good results with:

F5 Network Big IP Load Balancer 520

At other cusotmers we tested with it's incarnation:

Dell PowerEdgeTM Load Balancing Server - BIG-IP® Powered

Note: Load balancing was configured with “Least Used Connections”


I tried the software load balancing options and found them to be very pickey, inconsistent and inflexible.

The hardware based solutions we explored provided multiple methods of distributing loads and were very consistent. However, the “Least Used Connections” worked best with WebConnection.


Benjamin

Chris D
January 23, 2006

# re: Load Balancing for ASP.NET

We also use an F5 hardware balancer and it has been working quite well for us so far, a lot better than any previous software solutions we have tried in the past. We currently use it for balancing a 7 server cluster.

Chris D

Micky
January 31, 2006

# re: Load Balancing for ASP.NET

We have used NLB for quite some time now and have not had any major problems. The biggest thing to get right is the unicast/multicast as well as the correct type of switch (as I recall...it's been a while).

KimKman
April 07, 2006

# re: Load Balancing for ASP.NET

Any updates here Rick on what you are doing for LB?

I am considering a F5 BigIP 1500 or Coyote Extreme II for one client presently. They want complete control over LB fine tuning who goes where and for what content. Host is pushing for Windows NLB but I don't know. I am thinking if the client wants fine tuned control and can budget it go the hardware route.

Rick Strahl
April 07, 2006

# re: Load Balancing for ASP.NET

Hi Kim,

I agree. The big reason to use NLB is if you need to get something running quickly and you don't have hte budget to use the expensive hardware solutions. Hardware solutions tend to be easier to administer and don't effect the performance of the pool, so in general that is a the best solution.

We actually went with an older Big IP box for the load balancer which turned out to be a great deal and provided the solution needed for this particular client.

# DotNetSlackers: Load Balancing for ASP.NET


Shefeek
September 11, 2008

# re: Load Balancing for ASP.NET

Hi Rick,
What will be the ratio of cost b/w hardware and software solutions?
If we are going to do Loadbalancing with software, hardware , are we going to increase the loadbalancers as the server count increase?
Regards,
shef

wan optimizer information
January 08, 2009

# wan optimizer information

I\'ve found that in our network WAN accelerators have made a big difference

shrikant
June 03, 2011

# re: Load Balancing for ASP.NET

Hi All,

i have created an asp.net based relying party application and this application is deployed on farm-server where load

balancing is enabled and sticky session is also used.

when request come from single server in that time its working fine but during the post back if request server is changed in

that time it throws an exception "Key not valid for use in specified state".

i have tried to set same machine key on both server but still facing same problem.

i have found on net the alternative solution is set enableViewStateMac="false": can i use it what is demerit of this.

please any one can suggest me ?

thanks in Advance.

West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024