简体   繁体   English

Tomcat是否可以告诉mod_jk的负载平衡器在过载时使用另一个工作程序? 如果是这样,怎么办?

[英]Can Tomcat tell mod_jk's load balancer to use another worker when overloaded? If so, how?

Can Tomcat tell mod_jk's load balancer to use another worker when overloaded? Tomcat是否可以告诉mod_jk的负载平衡器在过载时使用另一个工作程序? If so, how? 如果是这样,怎么办?

I use Kodo JDO for my persistence layer of a multi-tenant application and a big factor in memory usage is the schema information loaded per database. 我将Kodo JDO用于多租户应用程序的持久层,内存使用的一个重要因素是每个数据库加载的架构信息。 Every organization who uses my application has their own database. 每个使用我的应用程序的组织都有自己的数据库。 The application does not support clustering or session serialization. 该应用程序不支持群集或会话序列化。 Retrofitting it to support those is out of scope for this project. 对其进行改装以支持这些功能超出了本项目的范围。

Each instance of Tomcat is limited to 4GB of heap to keep the garbage collector from choking. Tomcat的每个实例都限制为4GB的堆,以防止垃圾收集器阻塞。 No single instance of Tomcat has enough memory to load the schema of all the databases needed for all organizations. Tomcat的单个实例没有足够的内存来加载所有组织所需的所有数据库的架构。

Tomcat's load balancing is typically done by session. Tomcat的负载平衡通常是通过会话完成的。 Doing balancing by session can lead to one instance loading more schemas than its memory can hold and it will die a slow and painful death ending in a GC Overhead Limit. 按会话进行平衡可能导致一个实例加载的模式超出其内存的容纳能力,并且将导致缓慢而痛苦的死亡,最终导致GC开销限制。

My current workaround is to use multiple explicitly separate instances with separate host names. 我当前的解决方法是使用多个具有单独主机名的显式单独实例。 Each organization is given access to one of these host names. 每个组织都可以访问其中一个主机名。

One option would be for a "full" Tomcat to signal that it can't serve the user. 一种选择是让“完整” Tomcat发出信号,表明它不能为用户服务。

Can Tomcat tell mod_jk's load balancer to use another worker when overloaded? Tomcat是否可以告诉mod_jk的负载平衡器在过载时使用另一个工作程序? If so, how? 如果是这样,怎么办?

Interesting question (+1). 有趣的问题(+1)。 If you find an answer, do pass it on :) 如果找到答案,请通过:)

The only way I know of doing this is via a load balancer. 我知道做到这一点的唯一方法是通过负载平衡器。

Another cool feature of using a load balancer is that you can setup http health checks, so if anyone of your instances stops responds, it will move on to the next healthy server. 使用负载平衡器的另一个很酷的功能是,您可以设置http运行状况检查,因此,如果您的任何实例停止响应,它将继续移动到下一个运行状况良好的服务器。

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

相关问题 使用Apache mod_jk,tomcat的后备负载均衡器 - Fallback Load balancer with apache mod_jk, tomcat 使用mod_jk和Apache httpd时,将自定义错误页面用于Tomcat的404页面 - Use custom error page for Tomcat's 404 Page when using mod_jk and Apache httpd 多个Apache mod_jk服务器指向同一个Tomcat工作者? - Multiple Apache mod_jk servers pointing to the same Tomcat worker? 如何以编程方式调整mod_jk负载均衡器配置中的disable指令? - How to programmatically adjust the disable directive in the mod_jk load balancer configuration? 配置Apache以使用mod_jk中的问题 - problem in Configure Apache to use mod_jk 负载平衡Apache Httpd,Mod_Jk 32位,Tomcat 7,Windows 2008 R2 - Load Balance Apache Httpd, Mod_Jk 32bit, Tomcat 7, Windows 2008 R2 mod_jk或mod_proxy_ajp用于集群tomcat和ssl - mod_jk or mod_proxy_ajp for clustering tomcat and ssl URL路径中包含特殊字符时,将Apache ProxyPass或Mod_jk与Tomcat一起使用 - Using Apache ProxyPass or Mod_jk with Tomcat when there are special characters in the URL path 使用mod_jk,tomcat和jersey,如何保持长时间运行的请求? - With mod_jk, tomcat, and jersey, how do you keep a long running request alive? Tomcat在本地主机上未响应,但通过apache2 / mod_jk工作 - Tomcat not responding on localhost, but working through apache2/mod_jk
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM