Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Loadbalancing using mod jk |
|
Author |
|
martinr
Joined: 05 Jun 2014 Posts: 2 Location: Estonia
|
Posted: Thu 05 Jun '14 12:50 Post subject: Loadbalancing using mod jk |
|
|
Hello Everyone,
I have to two liferay instances located on different servers which I am trying to loadbalance using mod_jk.
Apache/2.4.7 (Unix)
CentOS release 6.5 (Final)
tomcat-7.0.27
workers.properties in apache:
worker.list=lb_patientp_lr,jkstatus
worker.lilac9009.host=host.x.com
worker.lilac9009.port=9009
worker.lilac9009.lbfactor=1
worker.lilac9009.type=ajp13
worker.lilac9009.domain=lilac9009
worker.lilac9009.connection_pool_timeout=60
worker.lilac9009.socket_keepalive=1
worker.lilac9090.redirect=thuja9090
worker.thuja9009.host=host.y.com
worker.thuja9009.port=9009
worker.thuja9009.lbfactor=1
worker.thuja9009.type=ajp13
worker.thuja9009.domain=thuja9009
worker.thuja9009.connection_pool_timeout=60
worker.thuja9009.socket_keepalive=1
worker.lb_patientp_lr.balance_workers=lilac9009,thuja9009
worker.lb_patientp_lr.sticky_session=1
worker.lb_patientp_lr.type=lb
worker.lb_patientp_lr.method=B
Tomcat server.xml:
<Connector port="9009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" jvmRoute="thuja9009"
maxThreads="512" connectionTimeout="600"/>
<Engine name="Catalina" defaultHost="localhost" jvmRoute="thuja9009">
<Connector port="9009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" jvmRoute="lilac9009"
maxThreads="512" connectionTimeout="600"/>
<Engine name="Catalina" defaultHost="localhost" jvmRoute="thuja9009">
The problem is that one instance (thuja) is always preferred. When both instances are active then all requests seem to go to thuja.
When I shutdown thuja instance then other instance lilac automatically start serving requests. However if I then start thuja again, then all the request again go to that instance. Does anyone have idea, why that is so? Both instance have lbfactor=1 and I dont see why one should be favoured.
Best,
Martin |
|
Back to top |
|
|
|
|
|
|