tags:

views:

186

answers:

2

Is solr a web application that can run on the same instance as a spring app on tomcat?

I've always run solr on its own server (jetty), along with a asp.net app so a bit confused if you need solr to run on its own server.

Or can you run both a spring web app and solr on the same instance as tomcat, both running on port 80?

+4  A: 

SOLR is a servlet, so its WAR can be deployed and run within the same servlet container (e.g. Tomcat) as your other servlets.

Chris B.
thanks for clearing that up!
Blankman
+1  A: 

Make sure you dont run solr in the same servlet container as your regular web application, if you do, make sure you secure access to it.

Ritesh M Nayak
+1 It's extremely unsafe to run in the same container.
volothamp
I somewhat disagree... I think it's like anything else, if Solr is using lots of resources, then put it in its own JVM (hardware). But if you are using Solr to store a couple thousand records, and not taxing the JVM, then by all means toss it in with your main app! I don't see it as a hard and fast rule at all.
Eric Pugh
@Eric, its not about the resources, its about security. The solr Admin page is public access if its run in the same container and people can update, delete indexed data. If its being run in the same container, its better to keep the application secure by allowing only the localhost address access to the webapp.
Ritesh M Nayak
You always need to think about the Solr Admin tool (and related requestHandlers) being exposed because there isn't any built in security.
Eric Pugh