Operating System - HP-UX
1752643 Members
5789 Online
108788 Solutions
New Discussion юеВ

MC/Serviceguard & Apache Web Server

 
Frank Grosberger_1
New Member

MC/Serviceguard & Apache Web Server

Has anyone out there configured Apache Web Server to fail over. I have a cluster that will contain apache and I was asked to provide a failover scenario for this. Please reply. thank you.
7 REPLIES 7
L Gehl
Occasional Advisor

Re: MC/Serviceguard & Apache Web Server

I haven't done Apache, but have installed it configured on a few servers at work.

1. Make sure it's part of a clustered vg.
2. Create the package configuration.
3. Modify it to your needs (ie, nodes to run it on, package name).
3. Create the package control script.
4. Modify it for starting and stopping apache.
5. Be sure to include *at least* one additional network card for each server for standby purposes (the card shouldn't be used for anything else if you want adequate failover).

L
L Gehl
Occasional Advisor

Re: MC/Serviceguard & Apache Web Server

I haven't done Apache, but have installed it configured on a few servers at work.

1. Make sure it's part of a clustered vg.
2. Create the package configuration.
3. Modify it to your needs (ie, nodes to run it on, package name).
3. Create the package control script.
4. Modify it for starting and stopping apache.
5. Be sure to include *at least* one additional network card for each server for standby purposes (the card shouldn't be used for anything else if you want adequate failover).

L
Gary Seibak
Advisor

Re: MC/Serviceguard & Apache Web Server

I have failed over Oracle, and it shouldn't be much different. You will probably want to create a service that looks for the apache httpd deamon to die. If it does fail it over. I would put the apache stuff on its on mountpoint(s) and a seperate VG. You really don't need service guard for this, you could just do some load balancing.
Gary Seibak
Advisor

Re: MC/Serviceguard & Apache Web Server

I have failed over Oracle, and it shouldn't be much different. You will probably want to create a service that looks for the apache httpd deamon to die. If it does fail it over. I would put the apache stuff on its on mountpoint(s) and a seperate VG. You really don't need service guard for this, you could just do some load balancing.
Gary Seibak
Advisor

Re: MC/Serviceguard & Apache Web Server

I have failed over Oracle, and it shouldn't be much different. You will probably want to create a service that looks for the apache httpd deamon to die. If it does fail it over. I would put the apache stuff on its on mountpoint(s) and a seperate VG. You really don't need service guard for this, you could just do some load balancing.
Matts Kallioniemi
Occasional Advisor

Re: MC/Serviceguard & Apache Web Server


Yes, I am running Apache under ServiceGuard. There's nothing to it, just start the daemon in control.sh like so:

function customer_defined_run_cmds
{
/apache/bin/apachectl startssl
test_return 51
}

You might want to use the packet address in httpd.conf/BindAddress instead of the default "*" so that users don't connect to the machine's permanent address by mistake and get confused at failover.
Emil Velez
Honored Contributor

Re: MC/Serviceguard & Apache Web Server


We are now doing it in our MC/ServiceGuard II course.

The standard script handles the IP Address, VG, logical volumes. You need a service that
monitors the Web processes and start and stop the web processes. Good luck. I enclosed some
code from a sample run/halt script.


SERVICE_NAME[0]="web_stk.mon"
SERVICE_CMD[0]="/etc/cmcluster/web_stk/web_stk.mon"
SERVICE_RESTART[0]=""

function customer_defined_run_cmds
{
/usr/local/bin/httpd
test_return 51
}

function customer_defined_halt_cmds
{
if
[ -f /usr/local/etc/httpd/logs/httpd.pid ]
then
kill $(cat /usr/local/etc/httpd/logs/httpd.pid)
fi
print "web is killed"
test_return 52
}