[英]Start Tomcat's HTTP/HTTPS connector after all the applications are deployed
Problem: 问题:
We have many applications in Tomcat and each one needs a lot of time to start. Tomcat中有许多应用程序,每个应用程序都需要很多时间才能启动。
During that time, if you make an HTTP request to the Tomcat port, it gets waiting till all the applications are fully started. 在此期间,如果您向Tomcat端口发出HTTP请求,它将等待所有应用程序完全启动。
As we have a load balancer that only checks Tomcat TCP connections, it is not smart enough to discard that Tomcat instance. 由于我们有一个仅检查Tomcat TCP连接的负载平衡器,因此丢弃该Tomcat实例还不够聪明。
Wanted solution: 想要的解决方案:
I would like to know how to start Tomcat so it starts to listen HTTP requests only after all applications are fully deployed. 我想知道如何启动Tomcat,以便仅在完全部署所有应用程序后才开始侦听HTTP请求。 In this way, the load balancer will notice that it is not possible to make a TCP connection and it will discard that Tomcat during that time.
这样,负载平衡器将注意到无法建立TCP连接,并且在此期间它将丢弃该Tomcat。
The tomcat wiki has a "how to" on this Tomcat维基对此有一个“如何”的建议
How do I make Tomcat startup faster? 如何使Tomcat启动更快?
In short: 简而言之:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.