Load balancing — copies behind one address and health checks
cheat sheet · Ubuntu 24.04 · nginx 1.24 · keepalived 2.2 https://lab.dimsanych.ru/en/wiki/load-balancing/Cheat sheet
-
sudo nginx -T | grep -A4 '^upstream'copies and their parameters -
tail -n 5 /var/log/nginx/access.log$upstream_addr: who answered -
sudo tail -n 3 /var/log/nginx/error.logwhy a copy dropped out -
curl -s -o /dev/null -w '%{http_code}\n' 127.0.0.1:8082copy alone -
curl -s -o /dev/null -w '%{http_code} %header{x-upstream}\n' localhost -
sudo nginx -t && sudo systemctl reload nginxapply without downtime -
ip -br aVIP is the second address