HAProxy setup for NLS
Posted: Wed Mar 08, 2017 9:45 pm
Hello,
Has anybody implemented HAProxy loadbalancer as frontend for NLS Cluster? i am currently trying to set it up and im having troubles with it. my HAProxy config is below. the problem is that when i hit the balancer, from the balancer logs it shows that both NLS are being connected to and i could not log in successfully to the NLS Page.
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option httplog
option dontlognull
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
log 127.0.0.1 local2
frontend main *: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 NLS #app
backend static
balance roundrobin
server static1 192.168.56.149:4331 check #changed from 127.0.0.1:4331 check
server static2 127.0.0.1:4331 check
frontend NLS
bind *:80
mode http
acl host_static hdr_beg(host) -i /static
acl url_static path_beg /static
use_backend static if host_static
use_backend static if url_static
default_backend NLS
backend NLS
balance roundrobin
server Client1 192.168.56.150:80 check
server Client2 192.168.56.151:80 check
Has anybody implemented HAProxy loadbalancer as frontend for NLS Cluster? i am currently trying to set it up and im having troubles with it. my HAProxy config is below. the problem is that when i hit the balancer, from the balancer logs it shows that both NLS are being connected to and i could not log in successfully to the NLS Page.
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option httplog
option dontlognull
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
log 127.0.0.1 local2
frontend main *: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 NLS #app
backend static
balance roundrobin
server static1 192.168.56.149:4331 check #changed from 127.0.0.1:4331 check
server static2 127.0.0.1:4331 check
frontend NLS
bind *:80
mode http
acl host_static hdr_beg(host) -i /static
acl url_static path_beg /static
use_backend static if host_static
use_backend static if url_static
default_backend NLS
backend NLS
balance roundrobin
server Client1 192.168.56.150:80 check
server Client2 192.168.56.151:80 check