HAProxy – How to Persist Configuration Changes via API

haproxy

I've been playing with HAProxy's APIs to disable servers and health checks. My plan is to eventually be able to add servers without restarting HAProxy.

But what happens if the server that runs HAProxy gets restarted? Is there a way for HAProxy to dump its in-memory settings to a configuration file so that it run as it was before a restart?

Best Answer

You’ll want to look at the HAProxy Dataplane API. It’s a separate method, but persists changes.

Related Topic