difference between apache tomcat vs Jetty

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

difference between apache tomcat vs Jetty

Karunakar Reddy
Hi,
I want to know what is the difference between running solr on tomcat-apache
server vs jetty server in production.
With jetty there is some issue with indexing(eg: If 120k[batch size 100]
records are getting indexed, around 15k are missing).





Regards,
Karunakar.
Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

kamaci
Which Jira issue points for: "With jetty there is some issue with
indexing(eg: If 120k[batch size 100] records are getting indexed, around
15k are missing)."?


2013/10/20 Karunakar Reddy <[hidden email]>

> Hi,
> I want to know what is the difference between running solr on tomcat-apache
> server vs jetty server in production.
> With jetty there is some issue with indexing(eg: If 120k[batch size 100]
> records are getting indexed, around 15k are missing).
>
>
>
>
>
> Regards,
> Karunakar.
>
Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Shawn Heisey-4
In reply to this post by Karunakar Reddy
On 10/20/2013 11:23 AM, Karunakar Reddy wrote:
> I want to know what is the difference between running solr on tomcat-apache
> server vs jetty server in production.
> With jetty there is some issue with indexing(eg: If 120k[batch size 100]
> records are getting indexed, around 15k are missing).

We recommend jetty.  The solr example uses jetty.  Only jetty receives
testing - whenever someone runs the tests included in the source code,
jetty is used - A LOT.  No tests are done with other containers before
release unless a person installs it under something like tomcat and
tries it out.  After release, other container testing is pretty much
done by users that don't use jetty.

Can you detail the problems you are having with indexing?  How is the
indexing being done - DIH, SolrJ, curl, or some other method?  Are there
errors in the client application or the Solr server log?

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Shawn Heisey-4
On 10/20/2013 2:57 PM, Shawn Heisey wrote:
> We recommend jetty.  The solr example uses jetty.

I have a clarification for this statement.  We actually recommend using
the jetty that's included in the Solr 4.x example.  It is stripped of
all unnecessary features and its config has had some minor tuning so
it's optimized for Solr.  The jetty binaries in 4.x are completely
unmodified from the upstream download, we just don't include all of
them.  On the 1.x and 3.x examples, there was a small bug in Jetty 6, so
those versions included modified binaries.

If you download jetty from eclipse.org or install it from your operating
system's repository, it will include components you don't need and its
config won't be optimized for Solr, but it will still be a lot closer to
what's actually tested than tomcat is.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Jonathan Rochkind
This is good to know, and I find it welcome advice; I would recommend
making sure this advice is clearly highlighted in the relevant Solr
docs, such as any getting started docs.

I'm not sure everyone realizes this, and some go down tomcat route
without realizing the Solr committers recommend jetty -- or use a stock
jetty without realizing the 'example' jetty is recommended and actually
intended to be used by Solr users in production!  I think it's easy to
not catch this advice.

On 10/20/13 5:55 PM, Shawn Heisey wrote:

> On 10/20/2013 2:57 PM, Shawn Heisey wrote:
>> We recommend jetty.  The solr example uses jetty.
>
> I have a clarification for this statement.  We actually recommend using
> the jetty that's included in the Solr 4.x example.  It is stripped of
> all unnecessary features and its config has had some minor tuning so
> it's optimized for Solr.  The jetty binaries in 4.x are completely
> unmodified from the upstream download, we just don't include all of
> them.  On the 1.x and 3.x examples, there was a small bug in Jetty 6, so
> those versions included modified binaries.
>
> If you download jetty from eclipse.org or install it from your operating
> system's repository, it will include components you don't need and its
> config won't be optimized for Solr, but it will still be a lot closer to
> what's actually tested than tomcat is.
>
> Thanks,
> Shawn
>
Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Tim Vaillancourt
I agree with Jonathan (and Shawn on the Jetty explanation), I think the
docs should make this a bit more clear - I notice many people choosing
Tomcat and then learning these details after, possibly regretting it.

I'd be glad to modify the docs but I want to be careful how it is worded.
Is it fair to go as far as saying Jetty is 100% THE "recommended" container
for Solr, or should a recommendation be avoided, and maybe just a list of
pros/cons?

Cheers,

Tim
Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Anshum Gupta
Thought you may want to have a look at this:

https://issues.apache.org/jira/browse/SOLR-4792

P.S: There are no timelines for 5.0 for now, but it's the future
nevertheless.



On Fri, Oct 25, 2013 at 3:39 AM, Tim Vaillancourt <[hidden email]>wrote:

> I agree with Jonathan (and Shawn on the Jetty explanation), I think the
> docs should make this a bit more clear - I notice many people choosing
> Tomcat and then learning these details after, possibly regretting it.
>
> I'd be glad to modify the docs but I want to be careful how it is worded.
> Is it fair to go as far as saying Jetty is 100% THE "recommended" container
> for Solr, or should a recommendation be avoided, and maybe just a list of
> pros/cons?
>
> Cheers,
>
> Tim
>



--

Anshum Gupta
http://www.anshumgupta.net
Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Tim Vaillancourt
Hmm, thats an interesting move. I'm on the fence on that one but it surely
simplifies some things. Good info, thanks!

Tim


On 24 October 2013 16:46, Anshum Gupta <[hidden email]> wrote:

> Thought you may want to have a look at this:
>
> https://issues.apache.org/jira/browse/SOLR-4792
>
> P.S: There are no timelines for 5.0 for now, but it's the future
> nevertheless.
>
>
>
> On Fri, Oct 25, 2013 at 3:39 AM, Tim Vaillancourt <[hidden email]
> >wrote:
>
> > I agree with Jonathan (and Shawn on the Jetty explanation), I think the
> > docs should make this a bit more clear - I notice many people choosing
> > Tomcat and then learning these details after, possibly regretting it.
> >
> > I'd be glad to modify the docs but I want to be careful how it is worded.
> > Is it fair to go as far as saying Jetty is 100% THE "recommended"
> container
> > for Solr, or should a recommendation be avoided, and maybe just a list of
> > pros/cons?
> >
> > Cheers,
> >
> > Tim
> >
>
>
>
> --
>
> Anshum Gupta
> http://www.anshumgupta.net
>
Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Cassandra Targett
In terms of adding or fixing documentation, the "Installing Solr" page
(https://cwiki.apache.org/confluence/display/solr/Installing+Solr)
includes a yellow box that says:

"Solr ships with a working Jetty server, with optimized settings for
Solr, inside the example directory. It is recommended that you use the
provided Jetty server for optimal performance. If you absolutely must
use a different servlet container then continue to the next section on
how to install Solr."

So, it's stated, but maybe not in a way that makes it clear to most
users. And maybe it needs to be repeated in another section.
Suggestions?

I did find this page,
https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+Jetty,
which pretty much contradicts the previous text. I'll fix that now.

Other recommendations for where doc could be more clear are welcome.

On Thu, Oct 24, 2013 at 7:14 PM, Tim Vaillancourt <[hidden email]> wrote:

> Hmm, thats an interesting move. I'm on the fence on that one but it surely
> simplifies some things. Good info, thanks!
>
> Tim
>
>
> On 24 October 2013 16:46, Anshum Gupta <[hidden email]> wrote:
>
>> Thought you may want to have a look at this:
>>
>> https://issues.apache.org/jira/browse/SOLR-4792
>>
>> P.S: There are no timelines for 5.0 for now, but it's the future
>> nevertheless.
>>
>>
>>
>> On Fri, Oct 25, 2013 at 3:39 AM, Tim Vaillancourt <[hidden email]
>> >wrote:
>>
>> > I agree with Jonathan (and Shawn on the Jetty explanation), I think the
>> > docs should make this a bit more clear - I notice many people choosing
>> > Tomcat and then learning these details after, possibly regretting it.
>> >
>> > I'd be glad to modify the docs but I want to be careful how it is worded.
>> > Is it fair to go as far as saying Jetty is 100% THE "recommended"
>> container
>> > for Solr, or should a recommendation be avoided, and maybe just a list of
>> > pros/cons?
>> >
>> > Cheers,
>> >
>> > Tim
>> >
>>
>>
>>
>> --
>>
>> Anshum Gupta
>> http://www.anshumgupta.net
>>
Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Mark Miller-3
Just to add to the “use jetty for Solr” argument - Solr 5.0 will no longer consider itself a webapp and will consider the fact that Jetty is a used an implementation detail.

We won’t necessarily make it impossible to use a different container, but the project won’t condone it or support it and may do some things that assume Jetty. Solr is taking over this layer in 5.0.

- Mark

On Oct 25, 2013, at 11:18 AM, Cassandra Targett <[hidden email]> wrote:

> In terms of adding or fixing documentation, the "Installing Solr" page
> (https://cwiki.apache.org/confluence/display/solr/Installing+Solr)
> includes a yellow box that says:
>
> "Solr ships with a working Jetty server, with optimized settings for
> Solr, inside the example directory. It is recommended that you use the
> provided Jetty server for optimal performance. If you absolutely must
> use a different servlet container then continue to the next section on
> how to install Solr."
>
> So, it's stated, but maybe not in a way that makes it clear to most
> users. And maybe it needs to be repeated in another section.
> Suggestions?
>
> I did find this page,
> https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+Jetty,
> which pretty much contradicts the previous text. I'll fix that now.
>
> Other recommendations for where doc could be more clear are welcome.
>
> On Thu, Oct 24, 2013 at 7:14 PM, Tim Vaillancourt <[hidden email]> wrote:
>> Hmm, thats an interesting move. I'm on the fence on that one but it surely
>> simplifies some things. Good info, thanks!
>>
>> Tim
>>
>>
>> On 24 October 2013 16:46, Anshum Gupta <[hidden email]> wrote:
>>
>>> Thought you may want to have a look at this:
>>>
>>> https://issues.apache.org/jira/browse/SOLR-4792
>>>
>>> P.S: There are no timelines for 5.0 for now, but it's the future
>>> nevertheless.
>>>
>>>
>>>
>>> On Fri, Oct 25, 2013 at 3:39 AM, Tim Vaillancourt <[hidden email]
>>>> wrote:
>>>
>>>> I agree with Jonathan (and Shawn on the Jetty explanation), I think the
>>>> docs should make this a bit more clear - I notice many people choosing
>>>> Tomcat and then learning these details after, possibly regretting it.
>>>>
>>>> I'd be glad to modify the docs but I want to be careful how it is worded.
>>>> Is it fair to go as far as saying Jetty is 100% THE "recommended"
>>> container
>>>> for Solr, or should a recommendation be avoided, and maybe just a list of
>>>> pros/cons?
>>>>
>>>> Cheers,
>>>>
>>>> Tim
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Anshum Gupta
>>> http://www.anshumgupta.net
>>>

Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Tim Vaillancourt
I (jokingly) propose we take it a step further and drop Java :)! I'm
getting tired of trying to scale GC'ing JVMs!

Tim

On 25/10/13 09:02 AM, Mark Miller wrote:

> Just to add to the “use jetty for Solr” argument - Solr 5.0 will no longer consider itself a webapp and will consider the fact that Jetty is a used an implementation detail.
>
> We won’t necessarily make it impossible to use a different container, but the project won’t condone it or support it and may do some things that assume Jetty. Solr is taking over this layer in 5.0.
>
> - Mark
>
> On Oct 25, 2013, at 11:18 AM, Cassandra Targett<[hidden email]>  wrote:
>
>> In terms of adding or fixing documentation, the "Installing Solr" page
>> (https://cwiki.apache.org/confluence/display/solr/Installing+Solr)
>> includes a yellow box that says:
>>
>> "Solr ships with a working Jetty server, with optimized settings for
>> Solr, inside the example directory. It is recommended that you use the
>> provided Jetty server for optimal performance. If you absolutely must
>> use a different servlet container then continue to the next section on
>> how to install Solr."
>>
>> So, it's stated, but maybe not in a way that makes it clear to most
>> users. And maybe it needs to be repeated in another section.
>> Suggestions?
>>
>> I did find this page,
>> https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+Jetty,
>> which pretty much contradicts the previous text. I'll fix that now.
>>
>> Other recommendations for where doc could be more clear are welcome.
>>
>> On Thu, Oct 24, 2013 at 7:14 PM, Tim Vaillancourt<[hidden email]>  wrote:
>>> Hmm, thats an interesting move. I'm on the fence on that one but it surely
>>> simplifies some things. Good info, thanks!
>>>
>>> Tim
>>>
>>>
>>> On 24 October 2013 16:46, Anshum Gupta<[hidden email]>  wrote:
>>>
>>>> Thought you may want to have a look at this:
>>>>
>>>> https://issues.apache.org/jira/browse/SOLR-4792
>>>>
>>>> P.S: There are no timelines for 5.0 for now, but it's the future
>>>> nevertheless.
>>>>
>>>>
>>>>
>>>> On Fri, Oct 25, 2013 at 3:39 AM, Tim Vaillancourt<[hidden email]
>>>>> wrote:
>>>>> I agree with Jonathan (and Shawn on the Jetty explanation), I think the
>>>>> docs should make this a bit more clear - I notice many people choosing
>>>>> Tomcat and then learning these details after, possibly regretting it.
>>>>>
>>>>> I'd be glad to modify the docs but I want to be careful how it is worded.
>>>>> Is it fair to go as far as saying Jetty is 100% THE "recommended"
>>>> container
>>>>> for Solr, or should a recommendation be avoided, and maybe just a list of
>>>>> pros/cons?
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Tim
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Anshum Gupta
>>>> http://www.anshumgupta.net
>>>>
Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Mark Miller-3
Things have actually improved quite a bit in that area. There have been many optimizations and additional ways to create large data structures off heap added in recent releases.

Someday G1 might even help a bit.

- Mark

On Oct 25, 2013, at 7:20 PM, Tim Vaillancourt <[hidden email]> wrote:

> I (jokingly) propose we take it a step further and drop Java :)! I'm getting tired of trying to scale GC'ing JVMs!
>
> Tim
>
> On 25/10/13 09:02 AM, Mark Miller wrote:
>> Just to add to the “use jetty for Solr” argument - Solr 5.0 will no longer consider itself a webapp and will consider the fact that Jetty is a used an implementation detail.
>>
>> We won’t necessarily make it impossible to use a different container, but the project won’t condone it or support it and may do some things that assume Jetty. Solr is taking over this layer in 5.0.
>>
>> - Mark
>>
>> On Oct 25, 2013, at 11:18 AM, Cassandra Targett<[hidden email]>  wrote:
>>
>>> In terms of adding or fixing documentation, the "Installing Solr" page
>>> (https://cwiki.apache.org/confluence/display/solr/Installing+Solr)
>>> includes a yellow box that says:
>>>
>>> "Solr ships with a working Jetty server, with optimized settings for
>>> Solr, inside the example directory. It is recommended that you use the
>>> provided Jetty server for optimal performance. If you absolutely must
>>> use a different servlet container then continue to the next section on
>>> how to install Solr."
>>>
>>> So, it's stated, but maybe not in a way that makes it clear to most
>>> users. And maybe it needs to be repeated in another section.
>>> Suggestions?
>>>
>>> I did find this page,
>>> https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+Jetty,
>>> which pretty much contradicts the previous text. I'll fix that now.
>>>
>>> Other recommendations for where doc could be more clear are welcome.
>>>
>>> On Thu, Oct 24, 2013 at 7:14 PM, Tim Vaillancourt<[hidden email]>  wrote:
>>>> Hmm, thats an interesting move. I'm on the fence on that one but it surely
>>>> simplifies some things. Good info, thanks!
>>>>
>>>> Tim
>>>>
>>>>
>>>> On 24 October 2013 16:46, Anshum Gupta<[hidden email]>  wrote:
>>>>
>>>>> Thought you may want to have a look at this:
>>>>>
>>>>> https://issues.apache.org/jira/browse/SOLR-4792
>>>>>
>>>>> P.S: There are no timelines for 5.0 for now, but it's the future
>>>>> nevertheless.
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Oct 25, 2013 at 3:39 AM, Tim Vaillancourt<[hidden email]
>>>>>> wrote:
>>>>>> I agree with Jonathan (and Shawn on the Jetty explanation), I think the
>>>>>> docs should make this a bit more clear - I notice many people choosing
>>>>>> Tomcat and then learning these details after, possibly regretting it.
>>>>>>
>>>>>> I'd be glad to modify the docs but I want to be careful how it is worded.
>>>>>> Is it fair to go as far as saying Jetty is 100% THE "recommended"
>>>>> container
>>>>>> for Solr, or should a recommendation be avoided, and maybe just a list of
>>>>>> pros/cons?
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Tim
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Anshum Gupta
>>>>> http://www.anshumgupta.net
>>>>>

Reply | Threaded
Open this post in threaded view
|

Re: difference between apache tomcat vs Jetty

Scott Vanderbilt
In reply to this post by Cassandra Targett
On 10/25/2013 8:18 AM, Cassandra Targett wrote:

> In terms of adding or fixing documentation, the "Installing Solr" page
> (https://cwiki.apache.org/confluence/display/solr/Installing+Solr)
> includes a yellow box that says:
>
> "Solr ships with a working Jetty server, with optimized settings for
> Solr, inside the example directory. It is recommended that you use the
> provided Jetty server for optimal performance. If you absolutely must
> use a different servlet container then continue to the next section on
> how to install Solr."
>
> So, it's stated, but maybe not in a way that makes it clear to most
> users. And maybe it needs to be repeated in another section.
> Suggestions?
>
> I did find this page,
> https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+Jetty,
> which pretty much contradicts the previous text. I'll fix that now.
>
> Other recommendations for where doc could be more clear are welcome.

Here are a couple of suggestions:

<http://wiki.apache.org/solr/SolrJetty>

Under section captioned "Init script to run the Solr example", it
describes init scripts based on whether you are running Jetty 6 or 7.
The problem is, if you use the custom version of Jetty (start.jar)
provided with the distribution (apparently the recommended one to use
based on earlier ports in this thread) you don't know which version of
Jetty this is. Of course, some users might know that running:

    java -jar /var/solr/start.jar --version

will tell them which version of Jetty start.jar is based on. This may
not be obvious to everyone, however.

The other problem, of course, is that the latest versions of Solr (4.5.1
in particular) are based on Jetty 8, and there is no init script
provided for that version. If the Jetty 7 script still works for Jetty
8, then a note to the effect may help avoid confusion.

Thanks.