Sabuncu
Sabuncu

Reputation: 5264

Why is Jetty needed when the Solr stack already comes with Apache?

Disclaimer: I am absolutely clueless about the Java world of things, other than knowing that Java code runs on a Java VM. I have a Solr instance running, and it uses Jetty. What I don't understand: why is there a need for Jetty when there is Apache web server running and sending requests to Solr at port # 8983?

I know this may be a silly question (that I am missing some part of the overall picture), and will appreciate your hand-holding.

Upvotes: 0

Views: 120

Answers (1)

jwismar
jwismar

Reputation: 12258

Apache httpd is a very good web server than can be used for handling http requests, serving static files, and so forth. Jetty (or Tomcat, another choice) are servlet containers, which are used as the environment in which a web application -- often a Java program -- runs.

It's very common to have an instance of Apache httpd running, handling certain requests, and forwarding other requests to a servlet container.

In this case, SOLR is a web application, and is using Jetty as its servlet container.

Upvotes: 1

Related Questions