Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2004
    Posts
    366

    Easy load balancing..

    I'd really like to set up load balancing for one of my CPU heavy apps. (it's on about 10 machines that are NOT identical, ie. some big, some small)

    Currently, I just use a PHP script to direct people to various servers, but it doesn't handle balancing & failover well, and I don't like that the URL changes to www2, www3, www4, etc.

    I've looked in to some simple balancers like Pen, Pound and Balance, but I can't find a crucial weighting / balancing configuration. I've also looked at DNS round robin, but that doesn't seem to be sticky, or have weighting or failover.

    So, is there any simple http load balancing software that can handle my requirements?

    - Stickyness
    - Weighted Balancing ( preconfigured or based on responsiveness)
    - Failover

    Thanks.

  2. #2
    Join Date
    Apr 2002
    Location
    USA
    Posts
    5,783
    LVS will do all that http://www.linuxvirtualserver.org/ or if you want something a little easier to configure I suggest the Coyote Point systems. http://www.coyotepoint.com/

  3. #3
    You might also consider a hardware load balancer like the Alteon/Nortel devices. They do support weighting of devices to give greater traffic loads to faster/more capable devices.
    *AlphaOmegaHosting.Com* - Hosting since 1998
    Managed Dedicated Servers and VPS
    Hosted Exchange 2010 Email Service

  4. #4
    Join Date
    Nov 2004
    Posts
    366
    wow, I think all those are over kill. Reading a little more on Pen, it says it supports weighting, and it seemed to support everything else. It seems to be by FAR the easiest and lightest weight solution. Has anyone used Pen with weighting?

    My servers are distributed in different data centers, so I'm not going to be adding hardware or changing around the network.
    Last edited by digdugdog; 10-12-2006 at 10:17 PM.

  5. #5
    Join Date
    Jun 2006
    Location
    NYC / Memphis, TN
    Posts
    1,454
    As stated by the user, I think he is looking for just a software based load balancer.

    http://www.backhand.org/mod_backhand/

    Works pretty well.
    PeakVPN.Com | Complete Privacy VPN | Cloud Hosting | Guaranteed Security | 1Gbps-10Gbps Unmetered
    PeakVPN | 31 VPN Servers | 17-Years Experience | Emergency 24/7 Support
    Visit us @ PeakVPN.Com (Coming SOON) | ASN: 3915

  6. #6
    Join Date
    Jul 2006
    Posts
    53
    Company I used to work for has a simple solution.

    Internet go to... www.abc.com resolves to 2 IPs...

    2 linux boxes running high availabily/heartbeat. 2 service IP addresses each running as master, so if one fails, the other box takes on both IP's and services them. And then running server side squid on port 80 and 443 with some rewrite rules.

    squid box turns www.abc.com into www.int.abc.com (or some such), and finds 10 IP addresses and the request gets sent to one of the apache servers at random. If one of the 10 dies, you just remove it from the www.int.abc.com list, and make sure the dns updates quickly. You could also setup a second ha cluster so that if one of the 10 dies, another takes on the work.

    Easy and reliable, also takes load off the 10 as the squid will cache quite a bit.
    Secure your server with http://www.serverangel.com/

  7. #7
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,569
    we have a pretty basic system - a perl script that sits on 2 machines listening for dns requests, and when it receives one it returns the ip address for the hostname requested depending on the a perl hash, which has a weighting system..

    doesnt have heartbeating etc (we have monitoring and an oncall engineer for that), but works really well for us, easy to configure and works well for a really big site

  8. #8
    Join Date
    Nov 2004
    Posts
    366
    Well, this is a dynamic application, it can't be cached, and I don't think I need the high availability on the redirector itself.

    I have a weighted redirection right now, I certainly don't want to go back to random balancing.

    The problem with DNS based solutions is that it'll eventually expire, and they could get a new server on the next DNS request. The user would lose their session in the application (and all their work) if that happened.

    Obviously, I'll want to get all the systems running more reliably. That main thing that's crashing systems right now is one suddenly getting overloaded. (while the rest are all just doing fine)

  9. #9
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,569
    outs are for web/realmedia, so its pretty much a 1 time session thing. the ttl is set really low (5 mins i think) so their next request will potentially go to a different machine/datacentre

  10. #10

    heartbeat + ldirectord

    Quote Originally Posted by digdugdog
    I'd really like to set up load balancing for one of my CPU heavy apps. (it's on about 10 machines that are NOT identical, ie. some big, some small)

    So, is there any simple http load balancing software that can handle my requirements?

    - Stickyness
    - Weighted Balancing ( preconfigured or based on responsiveness)
    - Failover

    Thanks.
    Look at www.ultramonkey.org for examples on how to use heartbeat + ldirectord for exactly what you need. It uses Linux Virtual Server, which is built into the kernel. Basically, you setup two boxes as directors. They both run heartbeat and one is the master director and the other one, the slave.

    All the IPs configured in DNS run in the public interface of the master node. That node receives the connections from clients, and depending on your configuration (weighted round robin, least connections,etc), connections are sent to the appropiate 'real servers' (i.e, servers running apache).

    ldirectord takes care of monitoring the Apache servers and taking them out of the cluster if they are down.

    There are many network topologies you can implement, and all of them are explained at Ultramonkey. We currently use the following one in more than 10 different clusters:

    http://www.ultramonkey.org/3/topolog...-overview.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •