免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2011 | 回复: 2
打印 上一主题 下一主题

[Web] 求助:lb worker的4种method的区别和用处 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-27 21:08 |只看该作者 |倒序浏览
看了下官网关于worker. properties的配置说明,对其中关于lb worker的method属性不太理解
分别是request、session、traffic、busyness。
谁能给解释下4者的工作方式和应用?

尤其是用在什么地方合适!

[ 本帖最后由 xxt_emo17 于 2008-5-28 10:04 编辑 ]

论坛徽章:
1
IT运维版块每日发帖之星
日期:2015-09-29 06:20:00
2 [报告]
发表于 2008-05-28 09:59 |只看该作者
你把官方文档中这三个方法的解释贴在这里,让大家帮你翻译或者解释一下

论坛徽章:
0
3 [报告]
发表于 2008-05-28 10:05 |只看该作者

回复 #1 xxt_emo17 的帖子

If method is set to R[equest] the balancer will use number of requests to find the best worker. Accesses will be distributed according to the lbfactor in a sliding time window. This is the default value and should be working well for most applications.

If method is set to S[ession] the balancer will use number of sessions to find the best worker. Accesses will be distributed according to the lbfactor in a sliding time window. Because the balancer does not keep any state, it actually does not know the number of sessions. Instead it counts each request without a session cookie or URL encoding as a new session. This method will neither know, when a session is being invalidated, nor will it correct its load numbers according to session timeouts or worker failover. This method should be used, if sessions are your limiting resource, e.g. when you only have limited memory and your sessions need a lot of memory.

If set to T[raffic] the balancer will use the network traffic between JK and Tomcat to find the best worker. Accesses will be distributed according to the lbfactor in a sliding time window. This method should be used, if network to and from the backends is your limiting resource.

If set to B[usyness] the balancer will pick the worker with the lowest current load, based on how many requests the worker is currently serving. This number is divided by the workers lbfactor, and the lowest value (least busy) worker is picked. This method is especially interesting, if your request take a long time to process, like for a download application.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP