Service Failover with heartbeat?

Posted by pmatthaei on Thu 31 Dec 2009 at 10:39

I have got e.g. two servers with Apache and Postfix and a virtual IP (from heartbeat-1). Well, heartbeat is working well and it is simple to deal with complete server outages, but how can I configure heartbeat, so that it also switches the server, if one of the above services fail?

I have read now some more things about pacemaker, openais, heartbeat-2 and so on, which seems to be a bit complicated and no howtos for it..

Share/Save/Bookmark


Posted by jurrit (87.209.xx.xx) on Thu 31 Dec 2009 at 13:06
[ Send Message | View Weblogs ]
If you want a simple solution for heartbeat 1, you can use mon: http://www.linux-ha.org/mon

--
http://www.virtualconcepts.nl/

[ Parent | Reply to this comment ]

Posted by Anonymous (95.132.xx.xx) on Thu 31 Dec 2009 at 17:37
ipvs (in kernel) + ldirector

[ Parent | Reply to this comment ]

Posted by Anonymous (77.164.xx.xx) on Wed 13 Jan 2010 at 17:40
pacemaker has documentation, just nothing really coherent. Clusterlabs has some good stuff and drbd.org also has a section about Pacemaker.

However, the init scripts in Debian (Ubuntu Server 9.10 at least) of corosync+pacemaker cause split brain upon shutdown/restart (https://bugs.launchpad.net/bugs/505981). This makes reliable operation impossible.

[ Parent | Reply to this comment ]

Posted by Anonymous (69.66.xx.xx) on Thu 14 Jan 2010 at 17:11
Just my $0.02, but I've been burnt multiple times setting up h-a systems using heartbeat mechanism and assuming that the system you're failing over still works. Of course you could schedule a h-a test monthly but most sysadmins fail at this. If you need h-a, skip the heartbeat and figure out how to load balance and remove as many single points of failure as possible.

[ Parent | Reply to this comment ]

Posted by Anonymous (174.71.xx.xx) on Tue 26 Jan 2010 at 01:58
I don't think you want to. Doing so removes notification if one server should fail. You always want to monitor both, so that if your backup goes south while the primary is still running, you're notified and can take appropriate action. Likewise, if the primary goes and fails over, you want to be notified so that you can get it back up and running ASAP so that you can either put it in as backup, or switch back to it.

[ Parent | Reply to this comment ]

Posted by jimfrey (209.47.xx.xx) on Thu 28 Jan 2010 at 15:45
[ Send Message ]
after examination heartbeat1 (need mon to check the services and fail over),
after work with heartbeat2 (xml config file, designed to be edited with GUI, painfull and clumsy, or you can edit by hand (recommended), but heartbeat2 has to be stopped and don't forget to erase backups and md5sums of the config, otherwise it will notice, and worse, heartbeat2 will write to that file status info (like, many lines)),

i discovered keepalived. not top notch doc, but enought to do everything : easily monitor others services (not like heartbeat)), take virtual ips, simple config, simple hooks. works with ipvs, (one config for all : virtual ips, forwarding to services). in case keepalived is used on the box with services, it will check it self.

[ Parent | Reply to this comment ]

Posted by Anonymous (83.241.xx.xx) on Fri 26 Feb 2010 at 12:00
You could use CARP to have them to share a public IP in master/slave configuration, and something like Pound (apsis.ch) on both to be able to (round-robin) loadbalance between the hosts

http://3molo.blogspot.com

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search