[英]What is the best practice when hosting more then one tomcat based web application
I do understand that using the same tomcat instance for a number of web applications has some risks (eg if one web application crashes tomcat it will terminate the other web applications as well.). 我确实了解到,对于多个Web应用程序使用相同的tomcat实例存在一些风险(例如,如果一个Web应用程序使tomcat崩溃,它也会终止其他Web应用程序。)。 The benefit is of course cost effectiveness since one server is enough and having all the web applications in one place makes it very easy to administrate. 好处当然是成本效益,因为一台服务器就足够了,并且将所有Web应用程序放在一个位置使管理起来非常容易。
Are there any industry guidelines on how a good setup with multiple web applications on tomcat should look like? 是否有关于如何在tomcat上使用多个Web应用程序进行良好设置的行业准则?
You are right that hosting of multiple we applications on one application server / web container (either Tomcat or other) has benefits. 没错,在一个应用程序服务器/ Web容器(Tomcat或其他)上托管多个we应用程序是有好处的。
You mentioned the robustness issue when one application may cause failure of another. 您提到了一个应用程序可能导致另一个应用程序失败时的健壮性问题。 But let's simplify this: even if you have only one application you still want 24*7 availability. 但是让我们简化一下:即使只有一个应用程序,您仍然希望24 * 7的可用性。 To achieve this goal people typically run more than one instance of application server with identical application on each one and load balancer in the enterence to the site. 为了实现此目标,人们通常运行一个以上的应用程序服务器实例,每个实例上具有相同的应用程序,并在站点中负载均衡器。 The same is relevant for several web applications. 对于几个Web应用程序也是如此。 Just run N (2 as minimum) application servers with identical set of web applications deployed and load balancer. 只需运行N个(最少2个)应用服务器,并部署相同的Web应用程序集和负载均衡器即可。 You will probably need a kind of watchdog that restarts server if it failed or if it stopped responding etc. 如果服务器出现故障或停止响应等,您可能需要一种看门狗来重新启动服务器。
In some cases kind of clustering is required. 在某些情况下,需要某种群集。 But it is other story. 但这是另一个故事。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.