← Start of tutorial

WIUNIX ACADEMY

HAProxy + Keepalived: build an active/standby VRRP load balancer

Page 6 of 6. Review the earlier steps and prerequisites before continuing.

YOUR SYSTEM. YOUR STEPS.

Where are you working?

Choose your OS and version. The prerequisites, commands and troubleshooting follow your environment.

Ubuntu 22.04 LTSReviewed against official documentation ·

USE YOUR OWN VALUES

Configure this tutorial

Set the example values for your environment; related explanations and copy panels update together. Never enter passwords, private keys or tokens. Values stay in this tab and are not sent to the server or share links. Check actual DNS, certificates and network policy before running commands.

Different IP addresses, domains or ports? Open the settings below, change the values and select “Apply to tutorial”, then copy the updated commands.

Set values for my environment8 editable values

Retire only this lab’s host-policy changes

Keep both Keepalived instances stopped while changing firewall policy. Review the rule additions you recorded: remove a matching runtime/permanent rule only if this lab introduced it, using the same actual interface zone and exact rich-rule string. Never flush a zone or use a blanket reset.

On the RPM path the commands also remove only the exact script context mapping introduced here and restore the recorded HAProxy boolean. Retain the script and backup until reference checks are complete. If a saved boolean is missing or malformed, stop and investigate rather than guessing the old setting.

Bash

Both lab VMs after VIP withdrawal

systemctl is-active keepalived
# Expected: inactive on BOTH nodes before changing firewall policy.
# Review the saved list of lab-only rule additions before removing any rule.

What this lab establishes—and what it does not

When you reproduce the exercise, record unique VIP ownership on both nodes and a successful application request from a third client before and after stopping the actual active HAProxy. That demonstrates new-request recovery in your network at that time; documentation and illustrative output alone establish no measured failover.

This setup does not provide fencing, quorum, seamless TCP/session transfer, database failover, TLS termination or cross-subnet disaster recovery. A partition may produce duplicate VIP owners, and loss of all usable backends deliberately withdraws both candidates. Plan those failure modes before adapting the pattern beyond the private lab.

GO TO THE SOURCE

Official references

Each environment states how it was reviewed. A documentation review does not claim a hands-on test of every version.

Explore all tutorials ↗