hi, I newbie in haproxy, I already install and configure haproxy for load balance on centos7, I have 2 backend server with diferent subnet IP. is this work in different subnets? haproxy canot start and show error mesage “backend app has no server available!”
- Load balancer server = 192.168.12.100 <== HAproxy I want install in this server
- Bacnkend server = 192.168.10.100
- Backend server2 = 192.168.11.100
haproxy.cfg
frontend app_servers *:80
default_backend apps
frontend main
bind *:5000
acl url_static path_beg -i /static /images /javascript /stylesheets
acl url_static path_end -i .jpg .gif .png .css .js
use_backend static if url_static
default_backend web-servers
#---------------------------------------------------------------------
static backend for serving up images, stylesheets and such
#---------------------------------------------------------------------
backend static
balance roundrobin
server static 127.0.0.1:4331 check
#---------------------------------------------------------------------
round robin balancing between the various backends
#---------------------------------------------------------------------
backend app
balance roundrobin
server app1 127.0.0.1:5001 check
server app2 127.0.0.1:5002 check
server app3 127.0.0.1:5003 check
server app4 127.0.0.1:5004 check
backend web-servers
server servera server1.local:80 check
server serverb server2.local:80 check