mod_jk redirect for worker
michal_rakoczy Apr 9, 2013 8:11 AMI would like to ask what is the proper configuration for loadbalancing worker and non-balanced worker referring to retries parameter.
My current configuration :
worker.list=loadbalancer,node3,node4
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node3,node4
worker.loadbalancer.sticky_session=1
worker.loadbalancer.method=R
worker.template.type=ajp13
worker.template.socket_connect_timeout=5000
worker.template.socket_keepalive=true
worker.template.ping_mode=A
worker.template.ping_timeout=10000
worker.template.connection_pool_minsize=0
worker.template.connection_pool_timeout=60
worker.template.reply_timeout=300000
worker.template.recovery_options=3
worker.node3.reference=worker.template
worker.node3.port=8309
worker.node3.host=127.0.0.1
worker.node3.type=ajp13
worker.node3.lbfactor=1
worker.node3.redirect=node4
worker.node4.reference=worker.template
worker.node4.port=8409
worker.node4.host=127.0.0.1
worker.node4.type=ajp13
worker.node4.lbfactor=1
worker.node4.redirect=node3
Before balancing node3 and node4 i used retries parameter for both workers, to avoid double requests to tomcat --> http://www.itpile.com/r2089/apache-mod-jk-repeats-request-to-tomcat-why :
worker.node3.port=8309
worker.node3.host=127.0.0.1
worker.node3.type=ajp13
worker.node3.lbfactor=1
worker.node3.retries=1
worker.node3.connect_timeout=15000
worker.node3.socket_timeout=60
worker.node3.connection_pool_timeout=60
worker.node3.socket_keepalive=True
worker.node4.port=8409
worker.node4.host=127.0.0.1
worker.node4.type=ajp13
worker.node4.lbfactor=1
worker.node4.retries=1
worker.node4.connect_timeout=15000
worker.node4.socket_timeout=60
worker.node4.connection_pool_timeout=60
worker.node4.socket_keepalive=True
I had skipped retries parameter between non-balanced and balanced configuration as i'm confused where to set it up - on loadbalancer or directly on node, i would like to also avoid infinite loops (is it possible ?) because of misconfiguration.
The doubts are :
- if retries parameter for loadbalancer is set up to 0 is it equal to node parameter equal 1 ?
- how the request is handled when retries is set up on loadbalancer and balanced worker simultaneously - which of them has higher "priority" ?