**Update for 2020: keepalived
and alternatives have been obsolete for a while, because they don't work in virtual clouds (AWS).Update for 2020: keepalived
has been obsolete for a while because it doesn't work in virtual clouds (AWS).
The rise of the cloudAWS and the end of VRRP
You really needOne needs to be familiar OSI network layers 2 and 3 at this point (MAC and IP). Network devices communicate with MACMAC and IPIP addresses, addresses are resolved with ARP.
The concept of floating IP being taken over-over involves a number of complex shenanigans in the network stack (all the acronyms above) to happen, it's not quite buildexactly designed-in nor expected behaviour.
On a physical network, multiple computers physically plugged ontointo one Ethernet switch, it usually works.
On a virtual machine, it usually doesn't work. The virtual network has to handle the network traffic (MAC and IP layers), it typically blocks the magic packets or isolate the virtual host preventing VRRP from operating.
The next aspect is CDN (CloudFlare, Akamai). All public websites run behind a CDN nowadays that provides caching, filtering and DDoS protection. CDN can provide load balancing between multiple upstream servers. Simply configure all the individual servers and they will sharethe traffic is split.
Last but not least. keepalived only allows to have a single active server out of many, it's wasting resources to put it lightly. This is actually a catastrophic issue in the real world because things need to scale and it can't scale by design. Failover solutions in use today -as found in clouds and CDN- are meant to distribute traffic across multiple destinations all active. It's a lot more complicated to achieve and is done cumulatively at different layers (see DNS, Unicast, OSPF and BGP). keepalived is not part of the picture anymore.