I try to figure out a way to dynamically manage the loadbalancer configuration.
I want to add and remove "service nodes" depending on the overall system load.
My research so far revealed "Thalassa" https://github.com/PearsonEducation/thalassa/blob/master/README.md which uses Node.JS + Seaport to manage clients and then updates the HA-Proxy configuration
Still I am not convinced if Thalassa is stable enough to be used in productive systems. Are there usable alternatives out there which offer the same features ?
Best Answer
If you authorize your stats socket, you can send commands to it.
From the 1.4 documentation
You can use this to effectively add and remove servers from active service.
Barring that, you can use
option httpchk
and block the check requests on the appserver side when a server should leave or join the balancing group. This requires some means to centrally manage that, of course.