Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I have two apache-based web servers serving up the same content. What are some of the technologies I can use to load balance between them? Please advise......
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    6

    Load balancing on Apache


    I have two apache-based web servers serving up the same content. What are some of the technologies I can use to load balance between them?

    Please advise...

  2. #2
    Just Joined!
    Join Date
    Jan 2007
    Posts
    44
    The easiest way to load balance would be to configure DNS.
    ---Create 2 A records with the same names.
    i.e www===192.168.0.1,www===192.168.0.2

    Since BIND supports DNS round robin, the A records will be alternated with each individual request.

    Cheers.

  3. #3
    Just Joined!
    Join Date
    Mar 2007
    Posts
    6
    Quote Originally Posted by k_amisi
    The easiest way to load balance would be to configure DNS.
    ---Create 2 A records with the same names.
    i.e www===192.168.0.1,www===192.168.0.2

    Since BIND supports DNS round robin, the A records will be alternated with each individual request.

    Cheers.
    Thanks for the help!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2006
    Location
    Arizona
    Posts
    7
    Isn't there also issues with using round robin dns?
    Such as if one of the servers goes down and the user has that specific IP resolved for that domain, to them it will look like your website is down until that server goes back up or their DNS is flushed?

    Also is it feasable to do load balancing with only the two apache servers and not another server? How does one deal with failover, say if one server goes down to re-direct that traffic to the remaining server?

    Sorry for the thread hijack but I assumed you were done.

  6. #5
    Just Joined!
    Join Date
    Jan 2007
    Posts
    44
    yahooglesoft well as i know it, the round robin problem is ussually prevalent with Windows i.e windows caches the first resolved address.

    Basically what you are talking about is clustering, but what the lad asked for was a simple solution. Implementing a shared storage and failover policies, is a tad complicated

    If clustering is your forte why not try and implement Heartbeat.

  7. #6
    Just Joined!
    Join Date
    Oct 2006
    Location
    Arizona
    Posts
    7
    I've worked a bit with heartbeat but found it a little confusing. I'm trying to understand if its possible to do something like this.

    user goes to domain testdomain.com which resolves to 132.195.128.152.
    This is one of the two apache servers, from here it will distribute the request to the current server or the other server. If the current server that responds to 132.195.128.152 goes down, the other server takes over the 132.195.128.152 ip address and will take the load until the other is back up and running, at that time the main server that originaly had the 132.195.128.152 i address will re-take it over along with the distribution. Is this a good way to do it? Other ways with pound would not be good because if pound went down then that would defeat the redundancy I'm looking for.

  8. #7
    Just Joined!
    Join Date
    Mar 2007
    Posts
    3

    load balancing of apache servers

    hi all ...

    the heartbeat application your are talking abt does not solve the purpose of load balancing ... it can only work in case u need redundancy ... i.e if one goes down only then the other comes up ./....

    load balancing will have the above failover feature but also when both the webservers are active it should share the total load .... equally ....

    this can be actived by something called clustering in webserver ....

    the big problem with the clustering is that all the webservers work in cluster and seem to be one virtual server to the world .... in this case if a server fails then the other server takes over ... but all the active sessions on the 1st server are lost and u have to create new sessions on the new apache server ....

    can anybody help me out with this .. ???

    Will be appriciated ....

  9. #8
    Just Joined!
    Join Date
    Nov 2008
    Posts
    3
    HI all
    Can I know how to do load balancing with mod_jk on suselinux platform........
    Plz help me.........its urgent.......
    Thanks in advance

    Regards
    Sunil kumar

  10. #9
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    I personally never recommend just a load balancer. You have just changed your single point of failure from the web server to the load balancer. A clustered load balancer is much better

    also, dns round robin doesn't provide failover, so if one fails every other request will die.

    for apache you can try pen or ha-proxy to load balance and then keepalived or heartbeat for the cluster. For another approach to load balancing (and my favorite choice) I would go with lvs, it is a little more difficult to setup but works better IMO.

    Pen
    HAProxy - The Reliable, High Performance TCP/HTTP Load Balancer
    Keepalived for Linux - Linux High Availability
    HomePage: Linux HA
    The Linux Virtual Server Project - Linux Server Cluster for Load Balancing

  11. #10
    Just Joined!
    Join Date
    Nov 2008
    Posts
    3

    Smile Regarding the load balancing

    Hi all

    Can anybody help me plz......i am trying to install hearbeat-ldirectord-2.99.2-2.3.i586.rpm on suse linux 10 plat form for the virtual server (load balancer) but i am getting this
    error
    rpmlib(payLoadIslzma)< =4.4.2-1 is needed by hearbeat-ldirectord-2.99.2-2.3.i586.rpm.

    Plz help me....
    Thanks in advance..

    I am feeling this is also the best link for the load balancing Load balancing howto: LVS + ldirectord + heartbeat 2 | Novell User Communities

    Regards
    Sunil Kumar G

Page 1 of 2 1 2 LastLast

Posting Permissions

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