Contact   •   Articles   •   Products   •   Search

Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs

Load Balancing for ASP.NET

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.

Make Donation

Feedback for this Post

# re: Load Balancing for ASP.NET
by Pepe Llopis January 19, 2006 @ 7:13am
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

# re: Load Balancing for ASP.NET
by Pepe Llopis January 19, 2006 @ 7:21am
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.
# re: Load Balancing for ASP.NET
by pj January 19, 2006 @ 7:45am
# re: Load Balancing for ASP.NET
by Rick Strahl January 19, 2006 @ 8:32am
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...
# re: Load Balancing for ASP.NET
by Ryan Heath January 19, 2006 @ 9:10pm
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
# re: Load Balancing for ASP.NET
by Pepe Llopis January 19, 2006 @ 11:03pm
to decide you can look here:

But F5 are my preferred, and Zeus company has a very interesting, good price quality relation, product.
# re: Load Balancing for ASP.NET
by Pepe Llopis January 19, 2006 @ 11:08pm
I use application Center to have a centralized console of the system.
# re: Load Balancing for ASP.NET
by Pepe Llopis January 19, 2006 @ 11:38pm
And is very important to correct configure the unicast/multicast, switch, etc.... or you can have problems like the one described on this link:

# re: Load Balancing for ASP.NET
by Benjamin Siegel January 20, 2006 @ 7:42am
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.

# re: Load Balancing for ASP.NET
by Chris D January 23, 2006 @ 5:55am
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
# re: Load Balancing for ASP.NET
by Micky January 31, 2006 @ 10:56am
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's been a while).
# re: Load Balancing for ASP.NET
by KimKman April 07, 2006 @ 5:03am
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.
# re: Load Balancing for ASP.NET
by Rick Strahl April 07, 2006 @ 10:44am
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
by DotNetSlackers Latest ASP.NET News November 19, 2006 @ 9:31pm
# re: Load Balancing for ASP.NET
by Shefeek September 11, 2008 @ 8:47pm
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?
# wan optimizer information
by wan optimizer information January 08, 2009 @ 1:29am
I\'ve found that in our network WAN accelerators have made a big difference
# re: Load Balancing for ASP.NET
by shrikant June 03, 2011 @ 4:48am
Hi All,

i have created an 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 - 2015