负载平衡和GC冻结

时间:2018-07-03 10:17:17

标签: java apache tomcat load-balancing mod-jk

我在STW时遇到SocketTimeoutException问题。我尝试通过使用mod_jk进行负载平衡来避免这种情况。

我的worker.properties:

worker.list=lb_stress,status_stress

worker.template.type=ajp13
worker.template.socket_connect_timeout=5000
worker.template.ping_mode=A
worker.template.ping_timeout=5000

worker.node1_stress.reference=worker.template
worker.node1_stress.port=8102
worker.node1_stress.host=host1
worker.node1_stress.distance=0

worker.node2_stress.reference=worker.template
worker.node2_stress.port=8104
worker.node2_stress.host=host2
worker.node2_stress.distance=0


worker.lb_stress.type=lb
worker.lb_stress.balance_workers=node1_stress,node2_stress
worker.lb_stress.sticky_session=0
worker.lb_stress.recover_time=200
worker.lb_stress.retries=3
worker.lb_stress.error_escalation_time=30

worker.status_stress.type=status

这没有帮助。当一个节点具有STW时,我的钢结构得到:

[Tue Jul 03 12:06:44.557 2018] [11251:139902461282368] [error] ajp_connect_to_endpoint::jk_ajp_common.c (1050): (node1_stress) cping/cpong after connecting to the backend server failed (errno=110)
[Tue Jul 03 12:06:44.557 2018] [11251:139902461282368] [error] ajp_send_request::jk_ajp_common.c (1663): (node1_stress) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110)

(和SocketTimeoutException)

是否可以使用mod_jk或另一个负载均衡器将一个节点上的STW重定向/重新发送到另一个节点上?

0 个答案:

没有答案