Apache/Failover

Support for webhosts that use CentOS
Post Reply
emersonsrodri
Posts: 4
Joined: 2011/07/05 11:59:06

Apache/Failover

Post by emersonsrodri » 2011/07/06 16:53:27

I used this link [url=http://wiki.virtastic.com/display/howto/Clustered+Filesystem+with+DRBD+and+GFS2+on+CentOS+5.4]http://wiki.virtastic.com/display/howto/Clustered+Filesystem+with+DRBD+and+GFS2+on+CentOS+5.4[/url] to create a DRBD/GFS2 cluster.
Node 1 has Apache configured and working. I haven't done anything on Node 2.
How do I configure Node 2 and my cluster to automatically redirect the traffic to Node 2 in case Node 1 fails ?

ixeous
Posts: 113
Joined: 2005/07/07 13:01:59

Apache/Failover

Post by ixeous » 2011/07/07 19:01:37

You need to cluster your http service. http://www.centos.org/docs/5/html/5.2/Cluster_Suite_Overview/. Your link only discusses the filesystem. Since you have dual primaries on drbd, you could use a load balancer rather than a cluster. Check out LVS + prianha for that http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtual_Server_Administration/ch-lvs-piranha-VSA.html. Otherwise,clustering I have an active/passive cluster (heartbeat not RHCS) for http/s services and have drbd configured as primary/secondary. I think it's a much simpler and more straight forward setup, but I don't need multiple simultaneous servers for load.

emersonsrodri
Posts: 4
Joined: 2011/07/05 11:59:06

Re: Apache/Failover

Post by emersonsrodri » 2011/07/07 23:09:42

Thank you very much, ixeous. If it is not too much to ask, do you think you could send me links on how to create a active/passive cluster (heartbeat not RHCS) for http/s services and have drbd configured as primary/secondary.
Again, thanks a million.

ixeous
Posts: 113
Joined: 2005/07/07 13:01:59

Re: Apache/Failover

Post by ixeous » 2011/07/08 02:37:14

First, take a look at http://wiki.centos.org/HowTos/Ha-Drbd. I also used the drbd documentation (http://www.drbd.org/docs/about). Especially chapter 5 and the chapter in part 4 corresponding to the cluster solution as it can be one of several. For heartbeat add the linux-ha documentation (http://www.linux-ha.org/doc/users-guide/users-guide.html). Pacemaker is the "new and improved" heartbeat. I'm using the old one though. I found that configuring the resources was easier using hb_gui. Also, I created a resource group, then created an ordered set of resources for the ipaddress, drbdadm (set node as primary/secondary), drbd mount, apache, ssh (this allows users to use the clustered ip for updating their pages). All software was able to be installed via respositories. no compiling needed.

Hope it helps.

Post Reply

Return to “CentOS 5 - Webhosting Support”