Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 943
danieltalsky Avatar asked Dec 23 '10 22:12

danieltalsky


2 Answers

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!

like image 61
Eric Pugh Avatar answered Sep 30 '22 19:09

Eric Pugh


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.

like image 31
Bozho Avatar answered Sep 30 '22 19:09

Bozho