Keepalived High Availability

Learn Keepalived High Availability. This module covers VRRP Concepts and Installation, Configuring the Master Node, Configuring the Backup Node, Testing Failover, Service-Aware Failover. You will master these essential Linux skills through hands-on labs and real-world challenges.

DevOps EngineerAnsibleDevOpsLinux

Introduction

Keepalived uses VRRP to give multiple nodes a shared virtual IP and elect which node should own it. This hands-on course moves from the protocol’s configuration building blocks to an observable failover and failback exercise in isolated Linux network namespaces.

You will define master and backup roles, priorities, advertisements, authentication, and a VIP; then stop and restore the master process while watching the address move. You will also connect an Nginx process check to VRRP priority so application health—not only node availability—can influence ownership.

What You Will Learn

  • Install Keepalived, enable IPv4 forwarding, and identify the correct network interface
  • Configure a VRRP instance with identity, interface, advertisement interval, and authentication
  • Assign a virtual IP and verify which node currently owns it
  • Create master and backup configurations with different election priorities
  • Stop and restore the master process to observe automatic failover and failback
  • Define a vrrp_script that checks Nginx and applies a negative weight on failure
  • Attach a health check with track_script and verify detection through service logs

Who This Course Is For

This intermediate course is for Linux administrators, DevOps practitioners, and infrastructure learners who understand basic networking and want practical experience with VRRP-based virtual-IP availability.

Prerequisites: Comfort with Linux shell commands, sudo, system services, configuration files, IP addresses, interfaces, and basic routing concepts. Familiarity with Nginx is helpful but not required.

Learning environment: A Debian-based Linux lab with Keepalived, Nginx, administrator access, and prepared network namespaces for the two-node failover exercise. Other labs use a single host to focus on configuration and health-check logic.

Frequently Asked Questions

Do I perform a real VIP failover between two nodes?

Yes. One lab runs separate master and backup Keepalived processes in isolated network namespaces. You stop the master, verify the backup acquires 192.168.10.10, restart the master, and verify the VIP returns.

Does the service-aware exercise fail over a live web service to a second server?

No. It stops Nginx on one host and verifies that pidof nginx failure reduces the effective VRRP priority and appears in Keepalived logs. The final challenge checks the same logic without a second web node.

Is this a production-ready HA design?

No. The course teaches core VRRP elections, VIP movement, and script weighting. It does not cover redundant physical networks, firewall policy, secure secret management, split-brain analysis, unicast VRRP, notification hooks, or production monitoring.

Teacher

labby
Labby
Labby is the LabEx teacher.