开发者

What are some Servlet Container pros and cons for a Solr installation?

The SolrInstall wiki page lists seven different server / Servlet Containers compatible with Solr:

  • Tomcat
  • Jetty
  • Resin
  • JBoss
  • WebSphere
  • Weblogic
  • Glassfish

I'm sure that "best" is subjective, so I'll just say my criteria are: easiest to set up, best for search performance with a smallish, infrequently-updated dataset, and with the fewest number of gotchas.

Jetty and Tomcat both have apt-get solr packages, so they're clearly the frontrunners for 开发者_开发技巧some. Jetty is used in the demo install, but there's some notes that Jetty has some difficulties handling Unicode in some cases. Tomcat is a common choice but my understanding is that it's not as lightweight and has a lot of features not needed by Solr.

Is it worth considering any of the others? Are there some important pro's and cons I should be aware of?


In Solr versions less then 4, the version of Jetty was patched to deal with the unicode issue, in fact the Solr dev team found the bug. In Jetty 7 and 8 the patch was applied. Solr 4 now uses Jetty 8.

As far as Jetty versus Tomcat, I've always found it a matter of preference, I haven't seen anyone show a real performance difference between the two!


The latter 4 can be excluded automatically - they are full-blown application servers which is not required by Solr. If Jetty has problems with unicode, then it's out too. You leave with Tomcat and Resin. Both being full-featured servlet containers, I'd go for the more widely-used - Tomcat. It is lightweight enough.


In a recent discussion, many solr developers indicated that the recommend using Jetty, specifically the Jetty version that ships with solr. That is the version most tested against and most used.


Following Solr5, Solr should be used as a blackbox.

https://cwiki.apache.org/confluence/display/solr/Major+Changes+from+Solr+4+to+Solr+5

http://grokbase.com/t/lucene/solr-user/15772hc1jd/jetty-in-solr-5-2-0

As of Solr6, it is still using Jetty but Solr developers may make their own application server mechanism in the future. Solr should be used as a service, and not as a war anymore.


The SOLR developers themselves recommend the packaged Jetty (https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+Jetty):

It is recommended that you use the provided Jetty server for optimal performance.

SOLR 5 is planned to be shipped without the WAR, as a stand alone app: https://issues.apache.org/jira/browse/SOLR-4792

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜