Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Linux Software

Load Balancers for Linux? 50

scales asks: "We currently use the Dispatcher component of IBM's WebSphere Edge Server as a load balancer on some Red Hat boxes where I work, and the boss has asked me to look into OSS alternatives. I've already been pointed at Linux Virtual Server and Ultra Monkey, and I was wondering if any readers have had any experience with these packages, or had any opinions they could offer about other products." Ask Slashdot last visited a similar topic way back in 1999, so I think it might be time for an update.
This discussion has been archived. No new comments can be posted.

Load Balancers for Linux?

Comments Filter:
  • If so did you call support? Who are you going to call if it is OSS? Make sure what ever you pick has at least some kind of level of support if this is a mission critical web farm. The last thing you want to have is a 24/7 web farm down and a manager standing behind you screaming.

    No matter what anyone else here says, make sure you have support for this thing unless you are the one the wrote it, or it is just not that important to you to keep it up 24/7.

    • by Alethes ( 533985 ) on Friday December 13, 2002 @03:54PM (#4882913)
      No matter what anyone else here says...

      That's rather disingenuous of you, actually, to basically assume that your thoughts on this subject should take precident before all others. In response, I would say that there are many more avenues for support in an OSS solution than would exist with a proprietary application.

      1) groups.google.com [google.com] is an infinitely valuable resource.

      2) The Linux Documentation Project [tldp.org] maintains a searchable list of man pages, HOWTOs and other documentation.

      3) Just about every OSS application in existence maintains mailing lists for developers and users alike for you to be able to receive and provide support for that particular application.

      4) There are many consulting companies and individuals out there that provide support on an as-needed basis should you be unable to find your answer elsewhere.

      The fact remains, that with an OSS solution, many more people (including developers on the project) are likely to have a better understanding of the application that are willing and able to provide knowledgable support just because of its openness, if that's, indeed, what you want. You may not actually be able to use the phone, but instead, you can send an email to a group of people that are actually passionate about the application, instead of trying to get help from poeple who either don't care, can't understand the application as well as the designers, or who are there to get their $10/hour for a few hours before they go home to finish their homework. When my boss is breathing down my neck about a problem, I'd much rather let him know I'm discussing the issue with one of the guys that designed the application rather than a highschool kid that reads a script to meet his inbound call quota.
      • by Neck_of_the_Woods ( 305788 ) on Friday December 13, 2002 @06:41PM (#4883976) Journal
        1> that is great, I am sure you can find support there for almost anything. Including stuff that has support for non OSS projects.

        2> That is great what if it is not in the "HOWTO's?". Last time I checked I did not see a HOWTO: What do do when your OSS load balancer goes down and they don't have any support. This is a blanket answer that assumes that what ever he gets has a howto. It also assumes that I can wait on e-mail. Or search for help or anything else under the sun that takes time. I don't want to be in this possition to have to go find help, I want to know it is there. Where, when, and my call...OSS programers/hackers/anything unless you find the right group that is getting paid is not this.

        3> Ahhh...ok that is great. You know this personally that every one of them lists the developers? I can call them? I can e-mail them and expect a response quickly? NO you say? mabye...I don't think I want to wait someones e-mail response on the future of my company. Sorry that just does not cut it.

        4> Ok now we are getting someplace. This is called support, which is what I said you need to check into. Glad that you agree.

        That last statement is an assumption. Period. You don't know that the guy the wrote the OSS is not a high school kid. Not that it even matters. What happends when someone tells you they don't know.

        Your telling me that if I had websphere, cisco, or microsoft that you can HONESTLY that a business can get the same support from people for free you can from paying someone? No you can't not for all of them, not for even 10% of them. So I said make sure you have support....find the one that falls in the 10%, buy a product with support at the ready. I did not say "don't get OSS". I said get something with support, your the one the jumped at "OSS does not have support". Why is that?

        I don't have time to wait for and e-mail, or a programmer to come back from snowboarding...or whatever when a 4million hit a day e-com site goes down. Sorry, you just can't play in that league without some security around your hardware, software, and everything else. Which your average everyday OSS project just does not have. Sorry if I got your nickers in a twist. Just the way it is.

        • I don't have time to wait for and e-mail, or a programmer to come back from snowboarding...or whatever when a 4million hit a day e-com site goes down. Sorry, you just can't play in that league without some security around your hardware, software, and everything else. Which your average everyday OSS project just does not have. Sorry if I got your nickers in a twist. Just the way it is.

          It's working fine for Yahoo!, which uses FreeBSD. FreeBSD isn't exactly providing any support. For that matter, look at all of those 4 million hit sites running Apache. Google runs Linux on their server farm. Now, imagine how incompetent these guys would have looked if they had neglected these software options because they couldn't get phone support. So, no, that's not "just the way it is."
          • I think what the guy is implicitly keeping in mind (and not writing explicitly) is that when a load balancer fails, it takes out N (where N is usually > 1) perfecly operational webservers in one point. Which does make it somewhat more critical than, say, the mailserver, which (usually) doesn't intrinsically kill, say, your DNS server. Unless they're both in one box, which has no parallel when anyone is using an HTTP load-balancer in concert with web servers.
            • by Anonymous Coward
              That's why you use more than one load balancer. Little thing we like to call 'fault tolerance'. BTW, the linux virtual server rocks. The only thing I've seen that works better are the load balancers that NetScalar builds. They're FreeBSD boxes with a load balancing application that also off-loads the TCP connections, allowing your webservers to better utilize their memory, saving CPU cycles and extra network overhead.
          • Yes, but Yahoo! and Google have people who develop for FreeBSD and Linux, which qualifies as "support".

            I don't write FreeBSD kernel drivers or Linux load balancing code, so I wouldn't qualify as support for my company.
      • I'd have to agree with this. Having used one of the big names in load balancing and having dealt with their support, my experience is that they are not quick and they are not responsive and my project is slipping because they don't understand their product well enough.

        The problem with support is that you assume because you are paying a lot of money to the company who created the product that whomever you contact in that organisation knows the product inside out and can answer your problem instaneously.

        The truth of the matter is that they are unlikely to understand you environment, and are likely to waste the first 30 minutes going through a set of basic questions which you have already tried anyway. It is a fallacy that telephone support is quicker because you are dependant on the skill and experience of the person you are calling. More specifically you are dependant on their skill and experience with the particular product you are calling about (no one is an expert on everything) and you are then subsequently dependant on the knowledge of other team members in the same room or the quality of the knowledge base that the support engineer is typing your problem into.

        If you ever had to ring up support for the worlds number one database vendor you would recognise this situation as they tell you they are typing your details into the system to see how other people with the same problem resolved it.

        It won't give your manager the same warm feeling of comfort but OSS and Google is just quicker and easier to support. As long as you choose a well supported project.
      • I just wanted to correct a few misconceptions in the previous posting.

        Disclaimer: I work on IBM Edge Server.

        First, the people you'll talk to if you have a problem with Edge Server are full-time career professionals, who specialize in Edge Server and work directly with the developers to get your problem solved. Because the support team work with customer problems every day, I suspect they're more knowledgeable than the developers on the issues that most often affect users. Of course, the developers get directly involved if the problem is tough.

        If you don't need a paid level of support, there are newsgroups on news.software.ibm.com where you can post questions and often get a response from other users or directly from a developer.
    • by gengee ( 124713 ) <gengis@hawaii.rr.com> on Friday December 13, 2002 @04:02PM (#4882993)
      That's terrible advice. Do you really want to to be on the phone with a Level I tech while your entire website is down? If a service is truly critical to you, and you're basing your decision on the speed of support, you've done something wrong in the design of your network.

      A much better solution would be to make everything redundant and failover automatically.

      • This is a given. Ff you playing at this level you need redundancy. Problem is what if it is not a hardware error, something else? How about a bug that hoses it from a malformed packet or something like that. DOes not matter how redundant you are, your down.

        Support is key. Get good support, I am not a linux or a microsfot biggot. I just believe in the right tool for the right job at the right price, with the right support. OSS sometimes is not the solution and it sometimes lacks support for things you can get a better shake on somewhere else.

        Just my 2 cents.

  • Try OpenMosix! (Score:1, Informative)

    by justanyone ( 308934 )
    OpenMosix is a Linux Kernel Patch that distributes load between Linux boxes invisibly to the user. Spawn an application and it is migrated to the box with the most availble processing power. Details available at OpenMosix.org [openmosix.org]. It's in wide university use.

    Simply put, it makes any group of linux boxes into a highly scalable cluster.

    This may do what you wish, it may not, but it's a good option. I'm in process on setting it up t home now - first I had to get a kernel compile going.

    OpenMosix sounds very interesting for multiplying processing power. We have more horsepower needs than capability now, and Solaris boxes are WAY too expensive - I want to migrate to an openMosix Linux cluster for way cheap.

    • Re:Try OpenMosix! (Score:5, Informative)

      by battjt ( 9342 ) on Friday December 13, 2002 @03:04PM (#4882542) Homepage
      Mosix will migrate processes. How does that load balance 12 apache servers?

      Mosix is good for CPU intensive batch number crunching using custom software. (no shared memory, no threads, smart use of IO and sockets, etc.). Don't get me wron. I think it is very cool, just not a load balancer the way most people use the term "load balancing".

      Joe
      • This may do what you wish, it may not -justanyone

        I'm so used to web-admins misusing the term 'cluster' on slashdot that I almost wrote an angry reply to your post out of pure habit. This time it's the other way around, but he *was* very careful to qualify his advice, so give him a break. Besides, not every service can just be 'load-balanced' on the IP level and forgotten. Mosix is a great solution for those that can't.

    • Re:Try OpenMosix! (Score:2, Insightful)

      by justanyone ( 308934 )

      I believe an OpenMosix cluster CAN help load balance and thus scale an Apache web farm. Follow my logic here: If your web application is serving very heavy requests, you can very easily be CPU bound, not IO bound (disk IO or comms IO). Take for example a web app that queries a database, grabs a large complex result set, parses the results, and creates a graph or PDF file, and thus takes 15 seconds at 100% cpu per request. On a normal Apache server, two simultaneous requests take 30 seconds and no one is happy (bigtime!).

      On an openMosix [sourceforge.net] cluster, the first heavy request uses all local CPU. The primary box (the only one running Apache) spawns a new process for the second, 3rd, 4th, etc. requests, which migrate automatically. They use the available custer CPU power, run to completion, migrate back, and the results returned as if the box was just very fast.

      I've written several CPU bound web apps; they made me nervous about timeout (I had limited optimization possibilities). I could have solved this worry with openMosix had it been available then.

      Please don't get me wrong, Joe Batt (and Thanks! to "benjamindees Alter Relationship"), this cluster concept will be entirely useless serving thousands of static HTML page requests. It wouldn't help a single bit. But with fewer, heavyweight requests, it could solve the problem rather simply.

      OpenMosix seems to be an ideal solution where programming time is limited and CPU needs are large (fat requests). If programming time is less limited, you could do the standard 3-tier architecture of a web, application, and database layer. You would then need to build in a one-to-many web-to-application-server architecture, so the app servers did the CPU and returned results to the web server. This method needs much more programming than my openMosix simple solution. If I was architecting Sears.com (I helped there a bit on back-end stuff), I would do 3-tier with a specialized load balancer where I had a support agreement with Quality-of-Service guarantees and liability insurance.

      But, if I was serving in-house queries of subsets of what-if scenarios from a data warehouse in PDF format, I'd probably want to use openMosix since the rest of the project would be so complex I'd want to cut down on complexity if at all possible.

      Another workaround would be to move the CPU requirements from Server to Client, running a big Java app on the browser box to farm out computing power. Hmmm. This would also require Java programmers, which are fewer in number, expensive, and add a completely new layer to my design. Ug. This approach limits me - I could't cache results, and I could blame their CPU's for the delay. But, Java already adds overhead (and thus time), and I don't know if the libraries are there for everything I want to do (granted Java has lots of libraries but it's not omnipotent). No, I like OpenMosix better here, too.

      Further, since adding more CPU is a simple matter of adding another box with a minimum of disk (or network boot), my project costs come way down even if all 14 VPs love my app and spend every morning from 7:30 to 9 running scenarios, I don't have to explain what "CPU Bound" means to them.

      OpenMosix is at OpenMosix.org [openmosix.org].
      • The primary box (the only one running Apache) spawns a new process for the second, 3rd, 4th, etc. requests, which migrate automatically. They use the available custer CPU power, run to completion, migrate back, and the results returned as if the box was just very fast.

        I looked into doing this not long ago. However, the documentation states that Apache won't work with OpenMosix because it uses shared memory, which is not yet supported.

  • Found it. (Score:3, Funny)

    by penguin_punk ( 66721 ) on Friday December 13, 2002 @03:06PM (#4882567) Journal
    I hear that the Wai Wai Tribe [slashdot.org] Is pretty good at balancing large loads.

    (ok. that was retarded, but someone had to say it)
  • Good Load Balancer (Score:2, Informative)

    by Anonymous Coward
    Hmm. If it's x86 or Alpha hardware there's something called FreeBSD that might really help things out.
  • Ultramonkey (Score:5, Informative)

    by ChiefArcher ( 1753 ) on Friday December 13, 2002 @03:14PM (#4882633) Homepage Journal
    I used UltraMonkey way back a few years ago.. It did the job.. and we never went down.. it has i believe 4 ways you can weight the webservers.... Actually.. it does more than just webservers... which is a plus as well...

    I liked..

    ChiefArcher
  • by adamy ( 78406 ) on Friday December 13, 2002 @03:17PM (#4882660) Homepage Journal
    If so look at JBoss's load balancing.

    If you just want it for Web server there is an Apache module for load balancing as well.
  • mod_backhand (Score:3, Informative)

    by catfoo ( 576397 ) on Friday December 13, 2002 @03:25PM (#4882721)
    i havnt used it, but, isnt this what your looking for... http://www.backhand.org/mod_backhand/ anyone here used it? did it leave your days filled with joy and happyness or dispair and bitterness?
    • I was extremely happy using mod_backhand to load balance an apache+tomcat setup in a commercial environment.
    • Yes, I've used mod_backhand [backhand.org]. It has great support through the authors as well as through the user development group -- just join their mailing list [backhand.org]. It has been deployed on simple 3-node web clusters to even more complex 15+-node web clusters, and it has worked just great at balancing the load of millions of daily pageviews.

      mod_backhand, as you can tell by its name, is an Apache module. So, this isn't a replacement for a hardware based load-balancer unless all you're load balancing is HTTP requests.

      It's very easy to implement if you're a semi-seasoned web admin that understands Apache directives in the httpd.conf. There are five built-in candidacy functions -- the things that choose which server will be chosen to serve up the data. The project was developed at the Center for Network and Distributed Systems [jhu.edu] at The Johns Hopkins University.
  • content balancer? (Score:4, Informative)

    by Twirlip of the Mists ( 615030 ) <twirlipofthemists@yahoo.com> on Friday December 13, 2002 @03:29PM (#4882745)
    I'm confused. Is there some reason why this job can't best be done with a content balancer? It's been about a year since I looked at them, but last I recall Cisco's Local Directors were very highly regarded. They had intelligent session-level balancing and such, and worked well.
  • Since you're already familiar with RH, why not take a look at AS 2.1? IIRC, it's based on Mission Critical Linux's Kimberlite config.
    • I was going to recommend RHAS as well. I've configured an LVS setup for a set of email gateways (not mail servers, just gateways) and it works very well. I had a couple of questions while doing the setup and Red Hat's phone support was very good. They did an excellent job of helping us track down our problem, which turned out to be a firewall issue. Since you're wanting a Linux-based load-balancer, I'd definitely check into this software.
  • Dosen't apache now have a load balencing module... or can't you just hack mod_cache and mod_proxy to do it?
    • By doing this, you still have a single point of failure. For a hosting facility to do it right you need redundant firewalls, load balancers, web servers, app servers, and database servers. I suppose if you wanted to do it on the cheap, you could use the NAT features of iptables and give packets multiple destinations and use a heartbeat package to remove destinations that go down.
      • Well... with any cost effective setup, you always have a single point of failure, no matter how hard you try. With enough time, scripting, and use of existing tools, you can remove the majority of your issues, but your still going to have a single point of failure... remember that weekend when /. was down for four days due to the switch taking a dump.... and then the redundant one going crazy or something like that.
  • by zmokhtar ( 539671 ) on Friday December 13, 2002 @04:32PM (#4883230) Homepage
    Redhat has it's own LVS tools with a web interface. Very easy to setup.

    http://www.redhat.com/software/advancedserver/tech nical/piranha.html [redhat.com]

  • I'm also interested in hearing about what other tools are available for load balencing under linux, but if you're using network dispatcher already why not keep on with that? I've played with it quite a bit and it seems pretty solid, so why switch? Is it falling short somewhere on features or what?

    Just curious...
  • by Jason W ( 65940 ) on Friday December 13, 2002 @05:40PM (#4883623)
    LVS was able to handle a medium-sized HTTP/HTTPS load at my last job quite well. It had 6 months of uptime serving 5-10 hits/second, and I literally never had to worry about it going down. In combination with mon, bringing machines up and down was never a problem, and failure situations were handled without the end user noticing.

    Installation was a bit frustrating because I hadn't dealt with the networking issues before (the ARP problem). However, in the end it was only my lack of networking knowledge that was lacking, and the ARP problem turned out to be simple to overcome.

    Support from the mailing list was great, I got thorough replies to my questions in a few hours. The documentation is good, although some parts of the HOWTO could be trimmed back a bit (more information than is needed to understand the problem, takes a bit of time to filter).

    The hardware was two slower UP boxes (one live, one for failover), and the load was esstentially 0, even with mon and MRTG running.

    LVS is of course just the load balancer, and the setup also included mon [kernel.org] for monitoring, heartbeat [linux-ha.org] for failover, and MRTG [ee.ethz.ch] for trending. They all play well together, and create a very reliable, informative, load balancer setup.

    Depending on your setup, one of the meta-packages such as Ultra Money or Redhat's HA suite might be best, but installing the components individually isn't much of a hassle either.
    • I have to second this. We use lvs on our mail system (close to 1 million email accounts) and on our web cluster (over 10,000 sites doing terabytes of data per month).

      Much cheaper then using a commercial product and a simple pentium2 w/ 128mb can handle quite a lot of traffic.
  • Cisco (Score:2, Informative)

    Buy a Cisco Local Director on Ebay. Buy two, they're cheap.

    Spend 15 minutes setting it up.

    Sleep well at night.
    • Re:Cisco (Score:2, Interesting)

      by tokki ( 604363 )
      Be careful with this. You'll get a cheap box, but you'll also get old, outdated code. Probably some type of bugs, or perhaps there are features that are only available in a later release.

      You won't get access to new code unless you have a support contract, that's just the way most vendors work. Often times a support contract costs more than the unit you bought on ebay, so keep that in mind.

      Unlike switches or other network devices, load balancers need constant upgrading.

    • If it works the same way, I was told:

      It send a Meta redirect to the client
      then if the browser isn't old/broken connects

      chews up some extra bandwidth, and s..l..o..w

      OK, the request, redirect, and new request are
      probably small compared to the returned page
      and I was told this by a stateful, wire speed, L4+ switch vendor
  • ask slashdot [slashdot.org] shows what they run.

    Arrowpoint switch/load balancers.
  • UltraMonkey is LVS (Score:5, Informative)

    by SwellJoe ( 100612 ) on Saturday December 14, 2002 @12:58PM (#4887370) Homepage
    I said it last time this came up in 1999 and I'll say it again. Ultramonkey is a combination of LVS (for balancing) and other tools (for fail detection, weighting, etc.).

    It doesn't make very much sense to say "Should I use UltraMonkey or LVS?" as the latter is a piece of the former. There are other combinations of LVS+other stuff that you might put into that sentence: "Should I use Piranha or UltraMonkey?" or "Should I use UltraMonkey or Joe Macks LVS Config scripts?" or even "Should I build my own LVS scripts or use an existing framework?"

    There are other HTTP load balancing options out there. Squid has a new branch in CVS called rproxy that handles multiple backend web servers very effectively with failure detection and other fun stuff (not to mention caching). Pound is a reverse proxy that does load balancing of HTTP traffic and SSL wrapping (most everything Squid can do for reverse proxying minus the caching features).

    Balance is a generic TCP load balancer with some nice features. The best features being that it is simple and works on more platforms than just Linux and handles more than just the HTTP protocol. It probably has some disadvantages for some situations because it operates at a lower level than the HTTP proxies above, though it can probably do lots of the same things LVS does (I don't know very much about Balance).

    Eddie is a neat framework written in Ericssons Erlang language. Seems to be dormant, but I think it is in pretty widespread use so is probably pretty stable.

    Links:

    LVS [linuxvirtualserver.org]
    Squid rproxy branch [squid-cache.org]
    Pound [gnu.org]
    Balance [sourceforge.net]
    Eddie [sourceforge.net]

  • Enhanced Load Balancing via new features such as Network Address Translation (NAT), Kernel-level Content Based Routing (CBR) support and the WebSphere Edge Server Consultant for Cisco CSS switches. This can improve server selection, load optimization, and fault tolerance. -The linked to site...

    I've been wanting to "balance"?? my DSL connection to the net... I want to give packets on certain ports higher priority... yet make sure that other trafic continues...

    I want to be able to tune my network connection to make low latancy medium bandwith applications work awesome, while making sure that webserfing happens reasonably fast, and streaming has its data put into order and maybe cached on the router...

    Basically, I want to prioritize between gaming, file sharing, streaming and downloading.. and browsing.

    Maybe having a few seporate network stacks?? (do I even know what I'm talking about?) and a process that can send a Woah, slow down buddy command to the servers?
    • Scenario

      DSL box
      |
      firewall (Linux/FreeBSD)
      |
      Your network

      For FreeBSD look at dummynet.
      http://info.iet.unipi.it/~luigi/ip_dumm ynet/
      Check out the weights and bandwidth stuff.
      Or look for traffic shaper in the ipfw man.

      For Linux look at netfilter aka iptables.
      http://www.fokus.gmd.de/linux/HOWTO/Adv -Routing-HO WTO-15.html

      # iptables -A OUTPUT -t mangle -p tcp --dport telnet \
      -j TOS --set-tos Minimize-Delay
      # iptables -A OUTPUT -t mangle -p tcp --dport ftp \
      -j TOS --set-tos Minimize-Delay
      # iptables -A OUTPUT -t mangle -p tcp --dport ftp-data \
      -j TOS --set-tos Maximize-Throughput

      --

      Scenario

      DSL
      |
      Cisco (firewall+router, with real IOS on it)
      |
      Your internal network

      OR

      DSL box = a Cisco router with IOS.
      |
      Your internal network

      Use the Cisco queueing features - when I last checked years ago there was at least custom, priority, and fair queuing. The Cisco docs on their website are pretty good - lots of examples, lots of example configs.
  • We use LVS to handle millions of pages a day and it just goes on and on. I'm glad we didn't spend money on the big names.
  • We have been using LVS for about 8 months now. It is rock-solid. You would want to be combining it with keepalived [sourceforge.net] for High Availability and failover. The thing about LVS is that it requires 2 dedicated load balancing machines to run in front of your web cluster. This can be a bit expensive. A possible solution that I discovered and am about to start evaluating, is a product called EAC [emicnetworks.com]. I initially found this product when searching for a way to cluster some MySQL servers together effectively. They are about to release an Apache solution as well. Where this product seems to differ is that there is no need for dedicated Load Balancing machines. The load distribution and scheduling is done by EAC software which is run directly from the machines in the cluster. As I say, I have not used it yet, but their documentation looks exciting and I have spoken to them in Finland. I am particularly excited about the MySQL clustering solution because it is promising to deliver the holy grail for MySQL which is a cluster of read AND write databases, sharing the same datasource in the same state with little or no performace hit for the real time replication. Bear in mind this is a commercial product with a per CPU license fee. But if you consider that you no longer need dedicated load balancers, the maths looks good.

An authority is a person who can tell you more about something than you really care to know.

Working...