2

I work for a small business that has one web server. It's served us fine in the past but as we're getting bigger we need another server.

How would I set up two servers to work together? I've read a bit about Pound load balancing, would I need a third computer to make this work?

The server will be doing basic web serving and a few light database operations.

I'm the most "techy" guy in the business and we've never had the need to hire a server guy so they're asking me to do this.

Can you help me out?

1 Answers1

2

I don't know anything about Pound, but I've done this with HAProxy and the theory I'm guessing is the same:

  1. Have two servers setup to serve the same website, as identical as possible (identical in terms of setup, not necessarily hardware)
  2. Set up a third server infront of these two servers, which will be your load balancer, and also your public facing interface to the world
  3. Configure the load balancer to distribute the incoming requests over the two servers. If one server can handle 10x the number of requests as the 2nd server, you can set up say a 10:1 balance in any decent load balancer.

So yes, you'll need a third server, however - there's a few things that might make your life better:

  1. The load balancer doesn't need to be physical - it can be a virtual machine. In fact if you make it a virtual machine that makes it a lot more flexible as you can move it around without anyone noticing
  2. The load balancer doesn't need to be a fancy pants machine if your request volume is low. I've had great success on a Pentium 4 box with HAProxy and a gig of ram (serving around 60,000 requests a day).

Load balancing and .NET websites can have some fun when it comes to session states and locally stored variables, but load balancers generally have settings that allow you to stick users to one web server, so that all future requests go to the same server for read the same data. If you don't have this issue then feel free to use round robin or some other method.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
  • Thanks for the great answer! How would I go about setting it up on a virtual machine? –  Sep 22 '10 at 00:50
  • Create a new virtual machine, assign two network interfaces to it (one for the internal traffic, one for the external traffic), install your OS of choice, then install and configure the load balancer ontop of that. Then, at your router, point all :80 traffic to the "external" IP address of the load balancer. – Mark Henderson Sep 22 '10 at 00:55