I am trying to use HAProxy’s runtime API to dynamically add backend servers as mentioned on https://www.haproxy.com/blog/dynamic-scaling-for-microservices-with-runtime-api.
When I execute this command:
set server be_template/websrv1 addr google.com port 8080
I get the error as:
Invalid addr ‘google. com’ by ‘stats socket command’
(Of course I used google as an example, I have my own fqdn for actual purpose)
However I don’t receive the error when I replace google (or my own fqdn) with the actual IP. Probably this indicates the DNS resolution is not working in the runtime API. (I am able to use the same server address if I put it in thr config at start up)
Can anyone help me out with this?