We have a system consisting of different components/services like database, webserver, fileshare, some self programmed daemons, etc. We now have the requirement to make all components/services redundant. As we want to start with a smaller system, we do not have for all services a separate server. For example we have web server (tomcat) and file server (nfs share) on the same machine. We are currently trying to implement this with heartbeat (www.linux-ha.org). It's not clear to me if we can assign different virtual IP addresses to different services. If e.g. the tomcat server crashes and doesn't come up again, we need to redirect all traffic to the backup machine. If there is only a problem with tomcat, there is no need to switch also the nfs share to the backup server.
If I see correctly, heatbeat can only switch the complete server node and can’t do it per service (assign different virtual ip address per service). It also can’t detect if a service (in our case tomcat or the nfs share) is available or not. Is there a way to implement what we need using heatbeat maybe in combination with another tool, or do we need to move on with another approach? Any suggestions are welcome.
UPDATE: Another approach I'm thinking about is to assign a virtual IP for each process. Than use nagios to monitor all processes. In case of a failure of a process, Nagios can delete the virtual ip assigned to the service and assign it to the backup server. This can be done by some shell scrips doing it. Is this a good idea?