3 ms·
Want to know what else is cool about haproxy? The stats unix socket. With it, you can query the existing configuration at whim, and with haproxy 1.4 or greater,
by falcolas 13y ago
Want to know what else is cool about haproxy? The stats unix socket. With it, you can query the existing configuration at whim, and with haproxy 1.4 or greater, you can configure haproxy on the fly.
show stat -1 4\n
disable server xyz\n
What's not so cool? Disabling a server does nothing to kill off existing connections to that server, and idle timeouts can cause problems if your processes are slow to respond.
With care, though, it's a great component of a HA solution, in addition to a being a great load balancer.
- nasalgoat 13y agoIf you're running multiple haproxy processes, the unix socket commands only work on the process you happen to randomly get when you use the socket. I've asked about plans to fix that and it's not on the current roadmap for 1.5. I need multiple processes to allow SSL offloading.
- falcolas 13y agoPerhaps start each up with a separate configuration file for each instance? Or run as a cluster, so changes to one are propagated to all (untested)? haproxy -f /path/to/alternate/cfg