Home

Keepalived

Keepalived is an open-source software project that provides high availability for network services by coordinating virtual IP addresses and load balancing on Linux systems. It works with Linux Virtual Server (LVS) to enable failover of VIPs and automated management of real servers, helping to minimize downtime in front-end services.

The core of keepalived is a daemon that reads a configuration file (keepalived.conf) to define VRRP instances,

Operationally, keepalived is often deployed in conjunction with LVS to provide a highly available frontend VIP.

Use cases include providing HA for web front ends, API services, or other front-facing components that require

virtual
IPs,
and
LVS
real
servers.
It
supports
VRRP
versions
2
and
3,
both
IPv4
and
IPv6,
and
provides
health
checks
through
built-in
simple
tests,
external
scripts,
or
other
monitoring
mechanisms.
When
a
health
check
or
state
change
occurs,
keepalived
can
trigger
notify
scripts
to
adjust
system
behavior
or
update
LVS
rules
accordingly.
In
a
typical
setup,
multiple
nodes
share
a
virtual
IP
via
VRRP;
one
node
acts
as
the
master
and
holds
the
VIP,
while
others
are
backups.
Node
priority
determines
the
master;
if
the
master
fails,
a
backup
node
takes
over
the
VIP,
and
LVS
rules
are
updated
to
restore
service
availability.
The
system
uses
VRRP
heartbeat
and
kept-alives
to
coordinate
failover
with
minimal
disruption.
a
stable
VIP
and
a
scalable
load-balancing
layer.
Keepalived
is
used
in
data
centers
and
cloud
environments
to
improve
resiliency
and
automate
failover
processes.
It
is
licensed
under
the
GPL
and
actively
maintained
by
the
open-source
community.