简体   繁体   English

可以对Tomcat 7使用自定义负载平衡策略吗?

[英]Possible to use a custom load balancing policy for Tomcat 7?

This is a variant of the previous question I asked: Possible to use Single URL for multiple tomcats 这是我问的上一个问题的一个变体: 可以对多个雄猫使用单个URL

I noticed that Tomcat's load balancer, JK, supports round-robin weighted load balancing. 我注意到Tomcat的负载均衡器JK支持循环加权负载均衡。

I'm wondering if it is possible for me to implement a custom load balancing policy that I can somehow plug into JK, or some alternative load balancer that works with Tomcat? 我想知道我是否可以实施自定义负载平衡策略,以某种方式可以将其插入JK或与Tomcat一起使用的某些替代负载平衡器?

The only references to custom load balancer policies I could find are from Tomcat 5.x, which allows you to extend org.apache.webapp.balancer.Rule to implement a custom load balancer rule... but I'm not sure if this is still possible with Tomcat 7. 我只能从Tomcat 5.x中找到关于自定义负载均衡器策略的参考,它允许您扩展org.apache.webapp.balancer.Rule来实现自定义负载均衡器规则...但是我不确定这是否Tomcat 7仍然可能

Tomcat6/7 can be configure with Apache+mod_cluster. 可以使用Apache + mod_cluster配置Tomcat6 / 7。

http://www.devx.com/Java/Article/48086/0/page/1 http://www.devx.com/Java/Article/48086/0/page/1
http://www.jboss.org/mod_cluster http://www.jboss.org/mod_cluster

In mod_cluster it is possible to calculate load on different factor. 在mod_cluster中,可以计算不同因子上的负载。

http://docs.jboss.org/mod_cluster/1.1.0/html/java.AS7config.html http://docs.jboss.org/mod_cluster/1.1.0/html/java.AS7config.html

mod_cluster uses load balance factors calculated and provided by the application servers, rather than computing these in the proxy mod_cluster使用由应用程序服务器计算和提供的负载平衡因子,而不是在代理中计算这些因子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM