一台机器上有两个webapp都在同一个servlet容器上而不是同一个servlet容器上不好吗? [英] Is it bad to have two webapps on a machine each on different servlet container than both on same?

查看:113
本文介绍了一台机器上有两个webapp都在同一个servlet容器上而不是同一个servlet容器上不好吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在ubuntu VPS上运行两个Web应用程序,但是一个(我自己的Web应用程序)更喜欢在Tomcat&中运行.在Jetty中,other(Solr webservice)是首选.但是我认为,与在同一服务器上运行的两个Webapp相比,为每个Webapp运行一个单独的服务器会消耗更多的资源(例如内存消耗会更高),不是吗?

I need to run two webapps on a ubuntu VPS but one(my own webapp) prefers to run in Tomcat & other(Solr webservice) is preferable in Jetty. But I think running a separate server for each webapp would be consuming more resources (like memory consumption would be higher) than both the webapps running on same server, isn't it ?

如果我同时运行Tomcat& ;;在一台用于生产的机器上的码头?

What may be the other bad if I run both Tomcat & Jetty on a single machine for production use?

推荐答案

在同一台机器上运行Tomcat和Jetty意味着性能方面"并不那么繁重",我几乎一直都在运行我的开发机...在生产环境中,我仅使用Tomcat(在同一个容器中运行多个Web服务-主要是我的Web服务+ Solr),并且在这两种情况下,我都没有遇到性能上的重大差异.因此,我想说这取决于您的需求...就我个人而言,我倾向于选择简化生产设置,并避免在服务器上的多个端口中使用多个容器.此外,Tomcat似乎确实是Java容器更受欢迎的解决方案(

Running Tomcat and Jetty in the same machine is something that "performance wise" is not so "heavy", I have both running (almost) all the time in my dev machine... in production I am using only Tomcat (running multiple web services in the same container - mainly my web services + Solr) and I do not experience major differences on performance in both scenarios. So I would say that it depends on your needs... personally I tend to prefer to simplify my production setup and avoid having multiple containers in multiple ports on my servers. Furthermore, Tomcat does seem to be more popular solution for java container (http://zeroturnaround.com/rebellabs/the-great-java-application-server-debate-with-tomcat-jboss-glassfish-jetty-and-liberty-profile/), this does not however mean it is the best one for all scenarios. I personally tend to stick with one Tomcat in production...

这篇关于一台机器上有两个webapp都在同一个servlet容器上而不是同一个servlet容器上不好吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆