Iis – Load balanced IIS. Should I use NLB, or linux-based reverse proxy, or something else

haproxyiisload balancingnlb

What would be the best approach for load-balancing at least 2-3 Windows 2008 R2 IIS webservers running a multitude of .NET applications? My choices appear to be:

1) Hardware-based network device load balancer, like a Cisco CSS
2) Windows NLB
3) Some sort of linux based proxy, either haproxy or other

The three servers sit as VMs on a vSphere farm, so I have the ability to clone to up the instance count in times of high load. I control the switch that the vSphere hosts are plugged into (Cisco 3750), but don't control the switching/routing infrastructure beyond that to the clients.

(1) Is too expensive, and probably overkill for my needs. I've included this in case someone figures out a cunning way to do it on my existing network kit, which I doubt.

(2) would seem to be the obvious "built-in" option, but seems to be quite fiddly messing around with network interfaces, multicast, and generally other things that seem to be needlessly complex. It's also fairly stupid, in that it can't remove hosts from the pool if they start throwing 500 errors or otherwise go wrong

(3) is the most interesting option, as it would appear to offer the most flexibility and customizability, but without having to mess around with the network. However, while I'm familiar with the reverse-proxy capabilities of lighttpd etc, I'm not that well read on other options like HAProxy, which might be able to offer a lot more.

Which would you go for, and is there anything I've not thought of?

Best Answer

At Stackoverflow we use HAProxy to balance against our Windows Server 2008 R2 IIS 7 web servers with great sucess. We love HAProxy and find it to be very flexible.