Hi All,
We have a haproxy that load balances two servers say app1 and app2 .
we had performed testing that and we are getting session expired error, the our case performed as:
- Web Server
- App1 and App2
The load balancer HAProxy server for App1 and App2 unable to maintained session.
I will attach our haproxy config (App1 + App2) below:-
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 tcp
log global
option tcplog
option dontlognull
#option http-server-close
#option forwardfor except 127.0.0.0/8
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
#-------------- Start ------------
frontend haproxy_inbound
bind *:1000
mode tcp
default_backend LB
backend LB
mode tcp
balance roundrobin
cookie JSESSIONID prefix nocache
server APP1 10.31.24.111:8109 check cookie APP1
server APP2 10.31.24.112:8109 check cookie APP2
peers Mypeer
peer LB1 10.31.24.111:1024
peer LB2 10.31.24.112:1024