There are commercial products that allow you to do this SUN Cluster and Veritas Cluster Server being the main two. These also do a lot more besides - checking for application availability and actually failing over shared disks, applications and services.
You can set up your own virtual IP addresses - interface name followed by :n where n is a number. e.g.
ifconfig hme0:1 <address> <netmask>+ up
The servers need to have unique 'real' IP addresses for the underlying interface (hme0 in the above example), and the Virtual IP address cannot be up on both hosts concurrently. You also need to consider routing since, for clients to fail over, all the addresses need to be on the same IP subnetwork.
To hand craft failover you will need to consider other things such as how you check system and application availability. Also need to cater for possible network outages where each isolated host thinks it is the 'live' server - a possibility is having a second private LAN for HA heartbeats.
Other applications such as Firewalls, Web Servers etc. often have their own proprietory ways of achieving failover.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.