您的位置:首页 > 运维架构 > Tomcat

在单位的TOMCAT负载均衡的配置,一直在运行很稳定

2009-08-29 09:39 302 查看
tomcat负载均衡一例
# lb-en
# ------------------------# server1
worker.tomcat-en1.port=8409
worker.tomcat-en1.host=172.16.41.30
worker.tomcat-en1.type=ajp13
# Specify the size of the open connection cache.
#worker.tomcat1.cachesize
worker.tomcat-en1.cachesize=100
worker.tomcat-en1.cache_timeout=600
worker.tomcat-en1.socket_keepalive=1
worker.tomcat-en1.socket_timeout=300
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.tomcat-en1.lbfactor=100# server2
worker.tomcat-en2.port=8409
worker.tomcat-en2.host=172.16.41.31
worker.tomcat-en2.type=ajp13
# Specify the size of the open connection cache.
#worker.tomcat1.cachesize
worker.tomcat-en2.cachesize=100
worker.tomcat-en2.cache_timeout=600
worker.tomcat-en2.socket_keepalive=1
worker.tomcat-en2.socket_timeout=300
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.tomcat-en2.lbfactor=100# ------------------------
# Load Balancer worker
# ------------------------
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
# ----> If a worker dies, the load balancer will check its state
# once in a while. Until then all work is redirected to peer
# worker.
worker.lb-en.type=lbworker.lb-en.balanced_workers=tomcat-en1,tomcat-en2
worker.lb-en.sticky_session=false

本文出自 “云计算与大数据_jxwpx” 博客,请务必保留此出处http://jxwpx.blog.51cto.com/15242/196835
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: