Card, PayPal or bank transfer · Morocco and worldwideتعلَّم · مارِس · أتقِن

Catalogue / Infrastructure & systems

High availability: HAProxy, Keepalived, Pacemaker and Corosync

Keep a service online when a server fails — load balancing with HAProxy and Nginx, a virtual IP with Keepalived, a Pacemaker/Corosync cluster with fencing, data replication, tested failovers and maintenance without downtime.

  • Intermediate to advanced
  • 12 lessons
  • 11 h 5 min
  • Versions Debian 12, Rocky 9, Ubuntu 24.04, HAProxy 2.4 (Rocky 9), 2.6 (Debian 12), 2.8 (Ubuntu 24.04), 3.0 (Debian 13), Nginx 1.20 (Rocky 9), 1.22 (Debian 12), 1.24 (Ubuntu 24.04), 1.26 (Debian 13), Keepalived 2.2 (Rocky 9, Debian 12, Ubuntu 24.04), 2.3 (Debian 13), Pacemaker 2.1 / Corosync 3.1 (Rocky 9, Debian 12, Ubuntu 24.04), Pacemaker 2.1, pcs 0.11 (Rocky 9), pcs 0.11 / crmsh 4.6 (Debian 12, Ubuntu 24.04), DRBD 9.2 (Debian 12, Rocky 9), PostgreSQL 15 (Debian 12), 16 (Ubuntu 24.04), 13-16 (Rocky 9), MariaDB 10.11 (Debian 12, Rocky 9), HAProxy 2.4-3.0, Keepalived 2.2, Pacemaker 2.1, HAProxy 2.6, DRBD 9

A MasterLinux course · Original text

What you will learn

  • Put numbers on availability (SLA, MTTR, RTO, RPO) and find a platform's single points of failure
  • Write an HAProxy configuration in L4 and L7 (frontends, backends, ACLs) and validate it with haproxy -c
  • Tune reliable health checks, session affinity and the right balancing algorithm for each service
  • Terminate TLS on HAProxy, publish the statistics page and drive servers through the admin socket
  • Use Nginx as a load balancer (upstream, passive failures, retrying on another server, TCP streams)
  • Hold a virtual IP with Keepalived/VRRP, tracked by a health script
  • Build a Pacemaker/Corosync cluster with quorum, fencing (STONITH), resources and constraints
  • Replicate data with DRBD, PostgreSQL and MariaDB, and read the state of a replication
  • Prepare and measure a failover, and carry out maintenance without downtime
  • Diagnose the major high-availability incidents (split-brain, flapping VIP, aggressive health check, missing fencing)

Course content

12 lessons · 11 h 5 min

Requirements

  • The “Fundamentals” course (included) or solid hands-on experience with the Linux command line
  • Able to administer a Debian or Rocky server (systemd services, IP networking, logs)
  • Basic knowledge of web servers (Nginx or Apache) and databases

Who is this course for?

  • System and network administrators running critical services
  • Operations and on-call engineers at IT service companies or hosting providers
  • Students preparing for a first job as an infrastructure or DevOps engineer