Hi,
I have the following config :
Server A and Server B
On server A and B I have Apache 2.2 Tomcat 6, 7 and 8.
I use HAPROXY to redirect to Server A and Server B :443
backend web-tcp-backend
mode tcp
balance roundrobin
balance leastconn
stick-table type ip size 1m expire 12h
stick on src
option ssl-hello-chk
server serverA 192.168.2.22:443 check
server serverB 192.168.2.33:443 check
I use mod_jk to forward request to tomcat with worker loadbalance:
Setting the First Tomcat Server web1 tomcat7 inst1
worker.web1tomcat7inst1.port=8719
worker.web1tomcat7inst1.host=serverA
worker.web1tomcat7inst1.type=ajp13
worker.web1tomcat7inst1.lbfactor=50
worker.web1tomcat7inst1.socket_keepalive=1
Setting the Second Tomcat Server web2 tomcat7 inst1
worker.web2tomcat7inst1.port=8719
worker.web2tomcat7inst1.host=serverB
worker.web2tomcat7inst1.type=ajp13
worker.web2tomcat7inst1.lbfactor=50
worker.web2tomcat7inst1.socket_keepalive=1
Setting the Load Balancer Worker
worker.loadbalancertomcat7inst1.type=lb
worker.loadbalancertomcat7inst1.balance_workers=web1tomcat7inst1, web2tomcat7inst1
worker.loadbalancertomcat7inst1.sticky_session=1
My question is:
Is my config OK or should I use HAProxy to check : serverA:8719 and serverB:8719 or let mod_jk loadbalancer do the job.
Thanks!