Main Content

Load Balancing - Hardware or Software?

Archive - Originally posted on "The Horse's Mouth" - 2009-01-15 07:41:59 - Graham Ellis

If you're fortunate enough to be looking after a web site that's so busy that a single server can't handle all of your traffic, what should you do?

One popular approach is to use a piece of specialised hardware - a load balancer - that sits in front of your network and distributed requests to a series of machines to service the requests. Devices such as the Cisco CSS 11506 Content Services Switch (CSS11506-2AC) , for example. But such devices cost money - this one pops up for around ,000; other may be as little as a third of that price, but still serious money.

There are some sites / applications where such a device is the best way to go - but there are other ways too if your site is too busy for one server to do everything ... but not swamped by an order of magnitude. You could, for example, run a front end system to proxy all requests through to one of a series of back end server where the real application work is done. And that front end system needs to be nothing more complex that a regular system running Apache httpd, using mod_proxy and mod_proxy_balancer to distribute traffic onwards. It's not ALWAYS going to be the solution for you, but as your site grows beyond the capacity of a single machine, it will allow for expansion without a huge investment in a specialist device and the training on and support thereof.

It's been pointed out to me that using an instance of httpd to forward all traffic leaves a single point of failure. Well - so does a hardware balancer in the scenario I have described above. Heartbeat scripts, checking device, etc, can overcome this issue and it need not be a concern.

We cover forwarding from Apache httpd on our Linus Web Server course and on our Apache / Tomcat deployment course. The first course is the one you should choose if you're forwarding to more instances of httpd, and the second if you're using httpd to front one or more Tomcat Java Application Servers.