Hello all !
I would realize an High Availability system for my http server.
Using 2 server linux with hearbeat installed, can I monitor the state >of
the
service httpd using ldirectord ?
Are 2 linux server enough or shoud I use a third server for >Ldirectord ?
The HA server topology with 2 server does permit to use ldirectord for
service monitorig / load balancing ?
Thank you
*********************************************************************
Damiano Bonometti
*********************************************************************
Hi Damiano,
Yes, you can load balance on a two node server configuration with IPVS. And
you can monitor availability of a service like http on both with ldirectord.
The primary server (which owns the VIP) will have to run in "localnode"
mode, of course, but it can forward requests to the backup server. The
latest version of Heartbeat will failover to the backup and remove the
loopback interface on the backup server and add the VIP on a real interface
(if you are using LVS-DR) on the backup server automatically at the time of
failover (then release it and add the loopback back at failback time).
Assuming, of course, that you have placed the VIP in the haresources file
for Heartbeat to manage.
You can also save the IPVS connections that were active to the backup
machine at the time of the failover (assuming it is the primary machine that
crashes) if you run something like the following command on the primary
server:
/sbin/ipvsadm --start-daemon master --mcast-interface eth0
Then something like this on the backup:
/sbin/ipvsadm --start-daemon backup --mcast-interface eth0
(Probably out of rc.local).
Now all you have to do is get both servers to have the same content.
Actually in a two node configuration this is a challenge. You can use your
own script (run out of cron) to rsync the data from the primary to the
backup but it is far easier if both machines mount the same data over NFS
(from a single HA NAS source) in my opinion.
Failback using the --start-daemon master/backup method described here will
not be automatic (you'll have to restart them in reverse rolls, or just
reboot everything).
To answer your other question: you can't really run ldirectord on a third
machine since this would be a single point of failure. You can, however, run
a Heartbeat pair and have a third machine act as a real server. If all three
machines run your service (http) then you won't have a single point of
failure.
You may want to check out some of the sample configurations on the Ultra
Monkey web site for ideas.
--K
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
|