Table of Contents
Keepalived is a high-availability and load-balancing tool. Using keepalived, virtual IPs and Linux Virtual Server and Virtual Router Redundancy setups can be managed very effectively between two or more hosts. From the Keepalived site: “The main goal of the keepalived project is to add a strong & robust keepalive facility to the Linux Virtual Server project. his project is written in C with multilayer TCP/IP stack checks. Keepalived implements a framework based on three family checks: Layer3, Layer4 & Layer5/7. This framework gives the daemon the ability of checking a LVS server pool states. When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entry from the LVS topology. In addition keepalived implements an independent VRRPv2 stack to handle director failover. So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.”
In our case we are mostly interested in the Virtual Router Redundancy Protocol (VRRP) part. A comprehensive introduction into VRRP can be found in the IBM Redpaper "Virtual Router Redundancy Protocol (VRRP) on VM Guest LANS" (see Link section below).