1. Unless usage is very light, you likely want Solr to be on a different
server. Its going to have different caching and system needs than your web
app. You may also want to scale Solr independently from your web app. Think
of it just like you think of a database-- do you want your MySQL instance
on the same server as your web app? For all but simple uses, I'd say no.
You want it separate so you can tune performance differently.

2. Most HTTP clients have a way for keeping the underlying socket
connection alive. So "open a connection" likely won't happen. You can feel
safe in relying on SolrJ or any other reasonable HTTP-based client
communicating to Solr from your web app.

Also, I always discourage suggesters that work on "every keypress". You
probably want a number of keypresses and a timeout to avoid overloading
your Solr servers. Or if you truly want that, be aware that it may come
with some performance issues.

3. I would seriously steer away from anything but Jetty. Also, doesn't Solr
5 not even give you a choice? Go with the defaults, they are tested well.
If you want to wrap it behind a security layer, then proxy Solr with
something like nginx (https://github.com/o19s/solr_nginx).

The readme at that github repo captures our philosophy for deploying a Solr
box with default Jetty fronted by nginx for some sane security

Hope that helps,
-Doug


On Mon, Apr 27, 2015 at 10:57 AM, O. Olson <olson_...@yahoo.it> wrote:

> I can get the standard Solr example to run within Jetty and I can use it
> through the velocity templates. I'm now thinking of integrating Solr with a
> couple of existing websites. In this regard, I have the following
> questions:
>
> 1. For a medium sized website (about 100+ concurrent users), what is the
> most popular way of integrating Solr? For e.g. do you just run Solr on the
> same WebServer/Application Server?
>
> 2. If you run Solr on a separate Server, how do you communicate with it
> from
> the Webserver?
>
> I was thinking of using SolrJ for this. However, I think that each time
> there is a Solr request, the server would have to open a connection to the
> separate server running Solr. I would be using the Solr Suggester, so for
> every keypress into my search box, there would be a separate connection to
> the Solr server. Is this OK?
>
> 3. If I consider using a separate Solr Server, is there a big difference
> between using Jetty vs Tomcat?
>
> I would prefer to use the embedded Jetty already packaged into Solr. On the
> other hand, would Tomcat be better able to handle more concurrent
> connections?  I'm looking for a big difference :-) ( because I'm lazy and
> would prefer to use the embedded Jetty.)
>
> Thank you in advance for your help
> O. O.
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Integrating-Solr-with-an-existing-web-application-and-SolrJ-tp4202611.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
*Doug Turnbull **| *Search Relevance Consultant | OpenSource Connections,
LLC | 240.476.9983 | http://www.opensourceconnections.com
Author: Taming Search <http://manning.com/turnbull> from Manning
Publications
This e-mail and all contents, including attachments, is considered to be
Company Confidential unless explicitly stated otherwise, regardless
of whether attachments are marked as such.

Reply via email to