简体   繁体   中英

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

I noticed that Tomcat's load balancer, JK, supports round-robin weighted load balancing.

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?

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.

Tomcat6/7 can be configure with Apache+mod_cluster.

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

In mod_cluster it is possible to calculate load on different factor.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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