thoughtarray / haproxy-consul-template

Run a HAProxy container that is configured by Consul Template
MIT License
1 stars 0 forks source link

Consider using haproxy 1.8 to transfer unix socket betweeen haproxy-a & b #1

Open hihellobolke opened 6 years ago

hihellobolke commented 6 years ago

Hi,

Per https://www.haproxy.com/blog/truly-seamless-reloads-with-haproxy-no-more-hacks/

Haproxy 1.8's socket transfer mechanism would provide seamless reload, basically both haproxy-a/b would share the socket file.

exec haproxy -f /usr/local/etc/haproxy/haproxy.cfg -sf $(s6-svstat /var/run/s6/services/haproxy-b | egrep -o "pid \d+" | egrep -o "\d+") -x /var/run/haproxy.sock
thoughtarray commented 4 years ago

Hey @hihellobolke, thanks so much for the info! I don't really do SD with this project in any of my work right now, but the seamless reload might replace the need for running two instances altogether if I'm understand it correctly!