Debian Planet










Welcome to Debian Planet

Search

All your woody are (not quite, but very very very soon) belong to us.
Main Menu

  • Home

  • Topics

  • Web Links

  • Your Account

  • Submit News

  • Stats

  • Top 10

  • Debian

    These are important Debian sites one should not be without!

  • Official Debian site

  • Package search

  • Mailing list archives

  • Bug reports

  • Debian on CD

  • Unofficial woody CD ISOs

  • Unofficial APT sources

  • Developers' Corner

    Other great Debian news sources:

  • Debian Weekly News

  • Kernel Cousin Debian

    (Debian mailing lists digested)
  • Community Groups

    Need help? You're not alone on this planet.

  • debianHELP

    (User support site)

  • Debian International

  • DebianForum.de

    (Deutsch)

  • EsDebian

    (español)

  • DebianWorld

    (français)

  • MaximumDebian

    (Italiano)

  • DebianUsers

    (Korean)

  • Debian-BR

    (Português)

  • IRC

    The place to get help on a Debian problem (after reading docs) or to just chat and chill is #debian on irc.debian.org.

    Many of the Debian Planet staff live there so pop by and say hello.

    Wanna write?

    Got that latest or greatest scoop? Perhaps you have some important news for the Debian community? Submit a news item!

    Or perhaps you've written a rather ground breaking insight into some aspect of Debian and you feel compelled to share it with others? Knock up a longer editorial article and send it to the editors.

    Sponsorship

    DP is sponsored by Xinit Systems and kieser.net.

    Domains paid for and hosted by uklinux.net.

    Buy your Debian merchandise at DebianShop.com.

    Who's Online

    There are currently, 95 guest(s) and 3 member(s) that are online.

    You are Anonymous user. You can register for free by clicking here.

      
    HTTP Load Balancing
    Contributed by galois on Wednesday, October 31 @ 13:01:10 GMT

    Ask Debianplanet
    I am looking for a way to do load balacing/high availabilty for several web servers - all running debian. A Hardware solution is not really an option - they are just too expensive. There are commercial produts that do what I want, but they come with RPMS and require Red Hat 6.2; their customer support won't go near debian machines.

    So, are there any options for systems running debian? Trolling through sourceforge turns up a few, but nothing looks really mature.

    My one requirement, is that it be able to preserve PHP sessions. ie: once a PHP session is started the load balancer always directs the client to the same machine.

    DanielS: Try apt-get install libapache-mod-backhand.

     
    Related Links

  • More about Ask Debianplanet
  • News by DanielS

    Most read story about Ask Debianplanet:
    XFree86 4.2.0

    Last news about Ask Debianplanet:

    Printer Friendly Page  Send this Story to a Friend
  • "HTTP Load Balancing" | Login/Create Account | 10 comments
    Threshold


    The comments are owned by the poster. We aren't responsible for their content.

    Re: HTTP Load Balancing (Score: 2, Informative)
    by James (jamesATrcpt.to) on Wednesday, October 31 @ 14:05:23 GMT
    (User Info) http://www.james.rcpt.to/

    Yes, mod-backhand is the answer you want. Check out www.backhand.org. You can do lots of tricks with load-balancing (that's *balancing*, not High Availablity/HA) with backhand. HA can come from other places, like the Wackamole project on backhand.org. Cruise the web site and check out the options. There are limitations under *extreme* load (eg, ApacheBench can starve the state feedback process), but if you are aware of this, then you'll be fine.
    -- James, libapache-mod-backhand maintainer

    [ Reply ]


    Re: HTTP Load Balancing (Score: 0)
    by Anonymous on Wednesday, October 31 @ 14:06:20 GMT

    For PHP sessions you have 2 options:

    1. Set the session files directory to a directory shared by all the servers (session.save_path in php.ini.

    2. Don't use the default session handler (files), use a handler that stores the files in a database accessible by all the servers.

    That way you don't care which server got the request. A session can be started on one server and picked up by another one down the road.

    [ Reply ]


    Re: HTTP Load Balancing (Score: 0)
    by Anonymous on Wednesday, October 31 @ 14:56:31 GMT

    How expensive is 'too expensive'?

    Would Zeus Load Balancer meet your needs?

    (http://www.zeus.com/)

    Declaration of interest: I work for Zeus. If you buy stuff from them, they can keep paying me and I get to eat, so obviously you should consider me biased 🙂

    Oh, and our customer support will support debian machines.

    Vivek

    [ Reply ]


    Re: HTTP Load Balancing (Score: 0)
    by Anonymous on Wednesday, October 31 @ 16:36:14 GMT


    DNS ? Make die primary website "www.mywebsite.bulk" and once you enter deeper down direct the people to

    one of the webserver by directing them to e.g. "www3.mywebsite.bulk" ?

    No special treatment needed and the cgi-bin script

    which directs the people may check if machines are still available - www.mywebsite.bulk might be a DNS Round-Robin which brings you some HA capabilities.

    Then set the DNS TTL of the "www" host down to 5 Minutes and automatically create the DNS Zone from the hosts which are reachable.

    BTW: How can a "Hardware Load-Balancer" provide better availability ? The availability of the site is the sum of the availabilitys of the essential componets. Adding more components cant provide better availability.

    Flo

    [ Reply ]


    Re: HTTP Load Balancing (Score: 1)
    by in1t on Thursday, November 01 @ 03:56:45 GMT
    (User Info) http://www.l4sb.com

    Try ZOE, Zope Enteriprise Objects. www.zope.org/Products/ZEO

    "ZEO turns the Zope object system into a distributed architecture, allowing multiple processors, machines, and networks to act as one website.
    "

    [ Reply ]


    Linux Virtual Servers (Score: 0)
    by Anonymous on Thursday, November 01 @ 19:30:03 GMT

    Have you looked into the Linux Virtual Server project? It does what you're looking for, all licensed under the GPL.

    Potato did have some LVS packages a while ago, but they're a bit out of date now. At work, we have a 400MHz Celeron with 64mb of RAM acting as a director for 4 load-balanced Web servers. The Director is a stock Potato installation w/ a 2.4kernel patched for IPVS.

    The project offers great documentation, but the just of it is this:

    All you need to do to get a quick-n-easy Load balancing setup up and running is this:

    1. Compile kernel (2.2 or 2.4, your choice)
    2. Configure the Director to forward IP's for your Real Servers
    3. Change the default gateway on the Real Servers to route through the Director
    4. Use the following commands (To your suiting)

    ipvsadm -A -t director.myserver.com:www -s rr
    ipvsadm -a -t director.myserver.com:www -r www1.myserver.com:www -m

    ...

    ipvsadm -a -t director.myserver.com:www -r www2.myserver.com:www -m

    With that, you have round-robbin load balancing setup. You mention that you need persistence handling as well: For that, simply change the '-s rr' in the first ipvsadm command to '-p'. With that, ipvs will keep the user with the same server at least as long as one connection is still open (TIME_WAIT).

    You can then setup your own customized heartbeat setup, or use some of the pre-made scripts (UltraMonkey, etc) from the LVS to remove unavailable Real Servers from the pool dynamically.

    We've been using this setup for a long time now, and I can vouch for it's stability. Using the LVS-NAT solution above, you should be able to get full 100MB/s throughput on the Director w/ a 300+MHz x86 processor.

    [ Reply ]


    Based on: PHP-Nuke

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2000 by Debian Planet

    You can syndicate our news using the file backend.php.