Hacker News new | ask | show | jobs
by bedis9 3154 days ago
No way to register new frontends, new binds neither new backends. We can only add/remove servers in backends for now. The "registration" you mentioned may happen later.

Please note that you can already do dynamic routing using ACLs or MAPS and updating your ACLs or MAPs content at runtime using the Runtime API (stats socket). there are "set map" and "set map" commands for this purpose.

1 comments

Thank you. I think dynamic routing would serve our purposes. Am I correct that the map-file as well as the running state needs to be updated separately via commands? I.e. HAProxy syncs between map-file and its runtime state only at setup time, correct?

If so, I have a suggestion: Have a look at what traefik (and before that Hipache) are doing - they use a KVS for the config and sync at runtime, which is quite convenient for dynamic usecases IMO. For the dynamic mapping it would be a better fit than just a file that needs to be manually managed.

For ideas on how to make use of the Runtime API to keep servers in a backend up-to-date dynamically, you can also take a look at a HAProxy Kubernetes Ingress Controller implementation that makes use of it here https://github.com/jcmoraisjr/haproxy-ingress#dynamic-scalin...

After 1.8 releases we plan on contributing DNS SRV capability to the controller as well.