4

My website is growing too large for the one webserver that powers it to handle the traffic. Anticipating this, the code is perfectly capable of running in parallel, sharing a database, but I've never actually tried to split one IP address among several webservers. What kind of hardware or software do I need to divide up incoming TCP connections between multiple boxes? Bonus points if the system can detect that one or more boxes has gone offline.

1
  • If you could shed some light on the operating system you're using for your website it would be easier to give recommendations. Both windows and linux has a few options for this.
    – Trondh
    Sep 25, 2009 at 12:18

5 Answers 5

8

You need a load balancer. There are two kinds : software and hardware.

  • hardware : You buy a box that usually has a web interface and will split the traffic evenly between web servers. They usually have many features that allow you to do many things such as 802.1Q support, SFP, Global load balancing, SSL Termination, so on and so forth. These are quite expensive and you can get them from Cisco, F5, Radware, Barracuda (cheaper).

  • software : You get a standard server and you install load balancing software. This is quite easy to do with Linux. You can use either HAProxy or ldirectord or Keepalived. There are quite a few to chose from. This is a cheaper method but without all the pretty web interfaces and fun features.

Any half decent load balancing system will detect an offline server. All the above do.

3

You could use Varnish for this, or Pound two good and robust systems and varnish will even cache your site like a king and speed things up.

1

To add to what Antoine said, I would recommend a hardware load balancer if your site really is getting large. Software Load Balancers have a tendency to add a lot of overhead traffic on your network. Hardware Load Balancers are also usually designed with failover in mind since if not it becomes a single point of failure. As Atnoine mentioned they usually are very expensive. If you are a smaller shop I would recommend looking into a Load Balancer by Kemp Technologies, they are well made and perform well for a price that is literally a 10th of the big boys listed above. We are currently using a pair to Load Balance our website, student portal, and online learning portal at the online university where I run where we quite a bit of traffic everyday.

2
  • Kemp does look really nice ! Barracuda is quite cheap actually but they don't look half as good as Kemp. Sep 25, 2009 at 13:30
  • Yes we actually looked at Barracudas and they have a horrible reputation for quality with their load balancers. Kemp actually uses the same software across all models, so the only difference between low and high is how much throughput the hardware can support.
    – Charles
    Sep 25, 2009 at 13:58
0

You can also kind of split up "services". Have one server handling requests for MySQL and the other handling web requests. You can also arrange it so that one is processing only images/static pages and the other handling dynamic requests. This should work regardless of operating systems and may provide some additional flexibility, but tightens the coupling of the servers.

1
  • This has a really mean tendancies to multiply SPOF. From a probabilistic point of view, you multiply the chance of failure by adding failure points to the chain of function. Take one down, you take everything down. Sep 26, 2009 at 8:23
0

The cheap way to do this is to get another IP address and add it to the A record for the website. Requests will then randomly be directed to one machine or the other. This doesn't automatically handle failover for you though, nor does it guarantee session consistency.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .