Comments on Efficient High-Available LoadBalanced Cluster On CentOS 5.3 (Direct Routing Method)

Efficient High-Available LoadBalanced Cluster On CentOS 5.3 (Direct Routing Method) This article explains how to set up an LVS cluster of load balanced virtual servers with Heartbeat and Ldirectord On CentOS 5.3.The load balancer sits between the user and two (or more) backend Apache/IIS web servers that hold the same content. Not only does the load balancer distribute the requests to the two backend Apache/IIS servers, it also checks the health of the backend servers. If one of them is down, all requests will automatically be redirected to the remaining backend server.

8 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: mbsouth

Thx for this tutorial, good job!

What I miss, in a lot of other tutorials too, is
- how to cross logging two or more Apache server when using it with LB
- how to synch the content of the Apache server when using it with LB
- how to repl. databases (not just mySQL, postgreSQL too) when using it with LB
 

mbsouth

By: risker

Loadbalancing MySQL could be done in the same way with the help ldirectord

 -> Master/Master replication or

-> Mysql NDBCluster replication (attention: there are some traps/limitations of the ndbcluster engine!)

http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations.html

By:

To do MySQL load balancing, I've used Galera from Codeship. It's a Master/Master setup that makes things realllllly simple. Load balancing is pretty easy.

By: arfore

mbsouth:

 One solution for sychronization of Apache content would be to setup an NFS mount to a SAN or NAS to hold all the web content.  Then you would just mount that on each web node and use it as the webroot.  This is what I have setup at my current job.

 Of course, for it to keep with the HA aspect of this guide, you would need to setup up separate NFS nodes and lb them as well.  Not sure if NFS supports that.

 What I did was to write a simple script that looks for the existence of the NFS content and if doesn't exist then the system stops Apache, runs a script to drop an emergency config file in place of the normal one and restarts Apache so that an emergency webroot that is local to the node is used.  I have found that this works really well.

 arfore

By:

Dear all

I need to setup 2 NIC on Load Balancer ?

How to route in Load Balancer for 10 network and 192 network?

 Load Balancer: ld.example.com, IP address: 10.10.10.52
Web Server 1: http1.example.com, IP address: 192.168.200.102
Web Server 2: http2.example.com, IP address: 192.168.200.103

By: U Sa Yar Gyi

Good Question. Somebody Knows?

By: sr71919

how to add a public IP for failover node?

in  "/etc/ha.d/ldirectord.cf"

 logfile="/var/log/ldirectord.log"
quiescent=no
virtual=192.168.6.241:80
        fallback=127.0.0.1:80
        real=192.168.6.243:80 gate
        real=175.41.131.110:80 gate
  <snip>

 once if  192.168.6.243 (local node) fails, load balancer should redirect to the public IP 175.41.131.110.

 How do i do this public node failover?

By: Anonymous

Hello,

What happens if the load balance get down?