Add load-balancing based on haproxy.
Allows layer 4 and 7 balancing.
Proposed CLI
set load-balancing reverse-proxy server fr01 backend 'bk01' set load-balancing reverse-proxy server fr01 mode 'http' set load-balancing reverse-proxy server fr01 port '8888' set load-balancing reverse-proxy backend bk01 balance-mode 'least-connection' set load-balancing reverse-proxy backend bk01 mode 'http' set load-balancing reverse-proxy backend bk01 server srv01 address '192.168.122.11' set load-balancing reverse-proxy backend bk01 server srv01 port '8881' set load-balancing reverse-proxy backend bk01 server srv02 address '192.168.122.11' set load-balancing reverse-proxy backend bk01 server srv02 port '8882'
config haproxy
vyos@r14# cat /run/haproxy/haproxy.cfg # Generated by /usr/libexec/vyos/conf_mode/load-balancing-haproxy.py defaults log global mode http option httplog option dontlognull timeout connect 5s timeout client 50s timeout server 50s # Frontend frontend fr01 bind :8888 mode http default_backend bk01 # Backend backend bk01 mode http server srv01 192.168.122.11:8881 server srv02 192.168.122.11:8882