Is it possible to use the same instance of HAProxy for multiple services by
configuring multiple frontend and backend sections ?

I have a Linux system which has been assigned multiple IP addresses
(primary and aliases) on the WAN interface and has HAProxy running on it.
Can I use the same instance of HAProxy to load balance multiple services
(being serviced by different set of backend servers) by configuring
multiple frontend sections, each of them listening on a different IP
address ?

The proposed configuration would be on the following lines where x.y.z.11
and x.y.z.12 are the IP addresses of the WAN interface.

frontend alpha
bind x.y.z.11:443
mode tcp
default_backend alpha
...
...
...

frontend beta
bind x.y.z.12:443
mode tcp
default_backend beta
...
...
...

backend alpha
mode tcp
server abc 192.168.100.11:443 check
server def 192.168.100.12:443 check
...
...
...

backend beta
mode tcp
server mno 192.168.100.21:443 check
server xyz 192.168.100.22:443 check
...
...
...

If this configuration is not possible, are there any alternative ways of
using the same system for load balancing multiple applications listening on
different IP addresses and running on different backend servers ?

Thanks,

Manish

Reply via email to