0

I need to make haproxy populate any changes across the multiple instances. In our setup we have two proxies with exactly the same config but we do failover manually. What I need is when I set one of the backend nodes to maintenance mode in the web gui so it replicates itself to the other node as well. As these are a runtime changes I can't see that sharing the config file would help here. Is there any elegant way to do that?

Thanks

smoofy
  • 3
  • 2

1 Answers1

0

There is no easy way to do that out of the box with haproxy. I think your best bet is to use consul and use consul-template to generate your config.

The idea is that any change in consul will right away trigger a config change in consul-template and then consul-template can reload your haproxy config

I have used it like that with really good success

https://github.com/hashicorp/consul-template

Mike
  • 22,310
  • 7
  • 56
  • 79