Slashdot Mirror


Simple DIY Linux/BSD based Network Balancers?

millisa asks: "I've been looking into options for inexpensive web based load balancing services for both Apache and IIS based web servers. There are plenty of commercial products out there that claim to do the job, but they are often too pricey, offer too many features, or are unreliable. I have lost the small amount of confidence I had in the MS based NLB services and do not like the idea of running multiple services on the same system anyways. I would like to build one (or more) simple front end load balancing Linux (or BSD) servers to direct traffic to the back-end systems if possible. I have seen mention of implementations based off of the Linux Router Project or the global load balancing oriented Eddie. What approaches are other geeks out there using for their LAN load balancing needs? I am especially interested in implementations that can maintain state (ie, handle sessions) as well as do some form of request inspection (so as to redirect those pesky web spiders to their own playground so a live user has the best web experience)." It's been long enough since the last time this came up, so lets revisit this question and touch upon the new solutions that have come up since 1999.

3 of 35 comments (clear)

  1. Linux Virtual Server Project by Jason+H.+Smith · · Score: 5, Informative

    We have recently done just this using the Linux Virtual Server Project, and it has turned out very well. Just be prepared to read a lot of documentation.

    Basically, you patch a stock Linux kernel and use a tool similar to ipchains to establish virtual services. These services forward requests to your back-end real servers according to a flexible ruleset that you design.

    You can use NAT to hide the real servers from the Internet if you like. This allows you to use most any web server you like (such as IIS), but more fancy routing tricks can be done with Unix or Linux servers for even better results. We use NAT at our site (university EE department) and it can handle more load than we will ever receive -- our objective is high-availability. Also, you can use different methods for different server clusters on the same director (e.g. tunneling tricks for Linux apache servers, and less magic for IIS).

    And LVS can be set up such that once a user connects to a particular server, his subsequent connections go back to the same server.

    Also, you can use freely-available third-party tools like Mon to watch your real servers for failure and dequeue them, page you, etc. etc. The bottom line is, since you are using Free tools to do this project, you are limited by your imagination as to what you can do with your cluster.

    I have been very happy with the result. And so have many others. If you want to hear big names, LVS is used by linux.com, Sourceforge, zope.org, VA Systems, and RealNetworks, according to their deployment page.

  2. Re:A great site by The+Mayor · · Score: 5, Informative
    High availability should not be confused with handling load. High availability ensures uptime for a server. Load balancing distributes a load across multiple servers, allowing the handling of larger loads. Linux-HA is for the former.

    Here are some links to some load balancing projects I'm aware of:

    • lbnamed - A load balancer written in Perl
    • Super Sparrow - A Linux-based load balancer
    • Ultra Monkey - A high-availability and load balancer solution based on Linux (it looks like Super Sparrow may be Ultra Monkey's load balancer)
    • LVS - A high-availability and load balancer solution based on Linux
    I've never used any of these, so I can't give any first-person accounts as to their effectiveness. This list isn't meant to be exhaustive, either. It's just a starting point.
    --
    --Be human.
  3. Foundry by austad · · Score: 5, Informative

    If you can't find what you're looking for with Linux or BSD, take a look at the Foundry ServerIron XL. It lists for $7995, but you can pick them up used for around $3000 each. The performance is way better than you'll see with a non-ASIC based platform, and it has more features than you'll find with a *nix solution. The foundry also does Global DNS load balancing if you have multiple different datacenters. At $3000, it's around the same price as a Dell 1650, which is what you'd need if you have a high traffic site (more than 80 or 90 Mbit/sec at any one time). I've been using Foundry and F5 for quite some time, and I have to say the Foundry definitely comes out on top, both in price and performance.

    FYI, F5's insanely priced products are simply a heavily modified version of FreeBSD running a modified version of Bind 8.

    --
    Need Free Juniper/NetScreen Support? JuniperForum