Add/remove backend servers from HAProxy with command line

autoscalinghaproxy

I've been searching for a way to add and remove backend servers from HAProxy dinamically, is there a wrapper or even an API to handle it? I want to make an auto-scale system with HAProxy and DigitalOCean. Others load-balancers are welcome.

Best Answer

There is no API or anyway to do what you want. You need to add the backends into the config and do a graceful reload.

What that does is it spins off another haproxy process to handle the traffic and the other process waits till it finishes and quits. You should be able to reload haproxy with no connection refused or bad requests.