On 16/05/2023 00:11, Lyndon Nerenberg (VE7TFX/VE6BBM) wrote:
Nick, spare yourself the pain and just designate one machine as the
master. This is how we run all our proxy server pairs (nginx,
squid, other stuff). For a pair fooa/foob, 'a' is the master, and
gets advskew 100. The 'b' host gets 150. Make sure preemption is
enabled.
When it's upgrade time, upgrade the 'b' machine and reboot. If it
looks stable, set its advskew to 50 and wait for it to pick up
traffic. Now upgrade and reboot the 'a' host. When it looks happy,
set 'b's advskew back to 150.
This keeps everything in a known state. You are going to break
connections no matter what -- even when you let the master float
-- so you might as well do it under your own control. We schedule
our updates for off-peak hours, and accept that the flip is going
to interrupt traffic. You just have to live with it.
We moved to this scheme on all our proxies and firewalls seven
years ago and have never looked back.
--lyndon
Totally agree on this and on top of that add load balancers/routers in
the mix which will run carp/relayd/pfsync/forwarding.
With sticky sessions, all requests will redirect to the same backend
server and you can avoid breaking service connections.
These don't have to be big machines.
G