问题
What is better container for SOLR: Tomcat or Jetty
回答1:
Jetty is bundled with Solr due to it's size:
The Solr example app has Jetty in it just because at the time we set it up, Jetty was the simplest/smallest servlet container we found that could be run easily in a cross platform way (ie: "java -jar start.jar"). That does not imply that Solr runs better under Jetty, or that Jetty is only good enough for demos -- it's just that Jetty made our demo setup easier.
Users should decide for themselves which Servlet Container they consider the easiest/best for their use cases based on their needs/experience. For high traffic scenarios, investing time for tuning the servlet container can often make a big difference.
I have been running Solr with Jetty for few small sites for months and had no problems.
My vote goes for Jetty.
回答2:
It runs in a Java servlet container such as Tomcat.
It shouldn't matter since they are both servlet containers. Use whatever you feel most comfortable with.
回答3:
Tomcat. We had some large documents truncated and dropped using Jetty.
回答4:
I used Solr with Tomcat6 with no problems.
The fact that Solr and Tomcat are both Apache products and still Solr comes with lightweight Jetty included must mean something.
Here are few Tomcat vs Jetty links:
http://www.slideshare.net/noriaki/jetty-vs-tomcat
http://www.asjava.com/jetty/jetty-vs-tomcat-performance-comparison/
From the Jetty evangelist standpoint:
http://www.webtide.com/choose/jetty.jsp
回答5:
I mostly used jetty while rapid prototyping with Solr. Because Jetty is packaged with Solr, it was very convenient to use. However, we use Tomcat6 in production. It was easy to transition.
I would say go with what your most comfortable with initially.
According to the Solr Wiki: "For non-trivial installations, JettyPlus is recommended." http://wiki.apache.org/solr/SolrJetty
回答6:
jetty has some issues with unicode text (or at least had when I was working on it the last time). So if you have non english documents to index, your only choice is Tomcat. Also, if you are looking at running solr on 64bit Windows Server - you can get a 64-bit Tomcat but I don't think there is a 64-bit Jetty server available.
回答7:
Don't think it especially matters, they'll both work.
If you're using either of them already, stick with it.
If not... well, given that Solr and Lucene are both Apache projects, it seems simpler to also go with Tomcat.
If you do want to go with Jetty though, you can.
回答8:
used with tomcat6 no problem, you will need to reload tomcat with each schema change however
来源:https://stackoverflow.com/questions/602857/solr-container