C daemon providing IPVS-based layer-4 load balancing, VRRP failover, health checks, and BFD on Linux servers.
Overview
Keepalived is routing software for Linux that combines layer-4 load balancing with high availability. It integrates with the kernel Linux Virtual Server (IPVS) module for distributing traffic and runs health checkers that add or remove real servers from pools based on live probe results.
High availability uses the VRRP protocol for router-style failover, including VRRP v2 and v3 for IPv4 and IPv6, sync groups to keep routing consistent after takeover, and optional HMAC authentication on adverts. Bidirectional Forwarding Detection helps detect link or peer failure quickly so VRRP can fail over faster.
The three areas—VRRP, IPVS load balancing, and health checking with BFD—can be used alone or together. A central I/O multiplexer coordinates multithreaded child processes for VRRP, checks, and BFD while a parent supervises them.
Most Linux distributions package Keepalived for straightforward installation. Configuration centers on keepalived.conf, with examples for floating addresses between master and backup nodes and extended guides for load-balanced services.
Key features
- Kernel IPVS layer-4 balancing
- VRRP v2 and v3 IPv4 IPv6
- Layer 4 to 7 health checkers
- BFD for fast failover hints
- VRRP sync groups
- HMAC secured VRRP adverts
- Multiple scheduling algorithms
- Distribution packages on Linux
Use cases
- Floating IP between two nodes
- Load balance backend server pools
- Automatic removal of unhealthy backends
- Highly available Linux routers