[英]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.