Sam
Sam

Reputation: 81

Which servlet container should I used for Solr: Tomcat or Jetty?

My group is writing a PHP/MySQL Web application that will also use a Solr installation to index Word and pdf documents (curriculum vitae, actually). We are in the process of deciding what servlet container to use for Solr, and have more or less narrowed it down to Tomcat or Jetty.

The amount of traffic is probably not going to be huge, but there should be room for growth, just in case.

Any suggestions?

Upvotes: 2

Views: 1995

Answers (2)

jeorfevre
jeorfevre

Reputation: 2316

You have two main uses: - big production environnement : choose tomcat ! if you want to server many app and put all together on an app server - smaller prod env : choose jetty ! - developpement : choose jetty : for dev purpose, quickness on install and simplicity of conf are the best !

if you've choosen JETTY forces you to keep jetty because it's embedded in solr. It's robust, safe and all package/easy to use. I know no one that runs solr productions server on jetty. Jetty is a bit slower than Tomcat. On jetty you only use one command to launch :

java -jar start.jar

See for JETTY versus TOMCAT: solr on jetty solr tutorial on tomcat

if you've choosen TOMCAT If youthink of installing tomcat on production, its better because faster in therm of the volumes of concurrent user and of performance. Take a look at this great reference about jetty versus tomcat performance.

Basically with the same hardware configuration : - jetty is more than 2X slower than tomcat (total response time)!!! - tomcat holds more than 2,5x more concurrent request (total of concurrent request)!!! enter link description here

Enjoy :)

Upvotes: 1

Krishan Gopal
Krishan Gopal

Reputation: 4133

I had to put lots of time to get new Solr running in Tomcat. Additionally I see multiple warnings coming in logs. I will have to figure those as well.

If your setup is not going to be big enough and you do not have any specific dependency on any java container you should take the advantage of Jetty.

You can simply jump on using the Solr (by default comes with jetty) as it is documented in official tutorial here https://lucene.apache.org/solr/4_8_1/tutorial.html

You would also need to workout Apache Tika for rich word processing and indexing.

Upvotes: 1

Related Questions