
Dynamic Configuration with the HAProxy Runtime API - phil21
https://www.haproxy.com/blog/dynamic-configuration-haproxy-runtime-api/
======
sandGorgon
Anybody know why companies like cloudflare use nginx versus haproxy as their
public facing infrastructure
([https://github.com/cloudflare/sslconfig](https://github.com/cloudflare/sslconfig))
?

It always seems to me as if haproxy was the superior tool with worse
UX/configurability than nginx.

~~~
markonen
Cloudflare is (among other things) a CDN/cache. haproxy does not cache.

~~~
mcarney23
It does now !

~~~
burntrelish1273
I wouldn't use it. Use the right tool for the right job.

Nginx is good at caching but Varnish is often better.

HAProxy is far better suited to providing load-balanced HA. Regarding this
article, this API makes is ideal to dynamically-reconfigure HAproxy, adding
and removing servers on-the-fly, which is super-useful in production.

------
nailer

        $ echo "help<command></command>" | socat stdio /var/run/hapee-lb.sock
        $ echo "help<command></command>" | socat stdio tcp4-connect:127.0.0.1:9999
    

Seems a bit weird, there's no XML anywhere else. Wonder if it's a markup issue
on the page.

~~~
mcdevilkiller
It has been changed now

------
feelin_googley
It is useful to be able to add/delete ACLs without restart.

Wish we could modify settings such as "use_backend", "backend" and "server"
the same way.

Maybe there is a workaround.

~~~
KasKrout
You can change the server settings using the "set server" command, but I think
it is not possible yet to change use_backend.

~~~
feelin_googley
Note I mean individual server settings for each backend in the backend
section.

------
JeanMarcS
I’m not sure I understand well: is the api only accessible from socket ? It
can’t be piloted from another container/vm/vps/whatever one use ?

Or did I misread this ?

~~~
lgas
It's accessible via TCP as well as unix sockets, so accessible from anywhere.

~~~
JeanMarcS
Great ! Thank you for your answer.

