HaProxy back-end as subnet


Can I somehow add whole subnet to back-end?
server app check

If i try to do this, i get syntax error when I restart haproxy service.
I need this in case, cloud starts to scale-out or scale-in. Or do I need to reconfigure haproxy.cfg manually and restart service?

According to the documentation (https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#server), the server statement accepts only one IP address. If you want to add multiple backend servers, you need to add them one by one:

server app-001 check
server app-002 check
server app-003 check

… and so on …

It may not have multiple IP at Instance, only one by on, otherwise parser error would come from configuration file

1 Like