Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Tutorial/Apache"

Line 1: Line 1:
== Using Jetty with Apache httpd ==
 
 
{{Jetty Tutorial
 
{{Jetty Tutorial
 
| introduction =
 
| introduction =
Using Jetty with Apache httpd
+
 
 +
Jetty is a full functional and optimized HTTP server and has no need of an apache httpd instance between it and the internet.  However, deployers often want to place an instance of apache between Jetty and the internet for some of the following "reasons":
 +
 
 +
* Performance.  Apache Httpd does have slightly superior performance to jetty for pure HTTP request handling. However, for dynamic response generation, apache must pass the request to another process and the resulting double handling reduces the total throughput to less than direct requests to Jetty.    More over, with the advent of comet style web applications, long held requests are common and the apache thread model assigns a thread per outstanding request, so apache does not scale to large numbers of comet connections.
 +
 
 +
* Static content.  Apache Httpd is very good at serving static content fast.  However, Jetty is no slouch either as it can use direct memory mapped buffers for static content, so that only kernel space is used for the data transfer.  Besides, if your application has a lot of static content, then you will get much better results by either ensuring good client caching or serving the content from an edge cache.
 +
 
 +
* Security. Some believe that apache gives them a more secure solution as there are no TCP/IP connections terminating on Jetty.  However, since Jetty is written in Java, it is not vulnerable to the class of security exploit that a server written in C is.  Jetty has a good security record, but has had some past issues, but mostly of the nature that would not have been helped by a fronting instance of Apache.
 +
 
  
 
| details =
 
| details =
  
 
}}
 
}}

Revision as of 19:01, 15 September 2009



Introduction

Jetty is a full functional and optimized HTTP server and has no need of an apache httpd instance between it and the internet. However, deployers often want to place an instance of apache between Jetty and the internet for some of the following "reasons":

  • Performance. Apache Httpd does have slightly superior performance to jetty for pure HTTP request handling. However, for dynamic response generation, apache must pass the request to another process and the resulting double handling reduces the total throughput to less than direct requests to Jetty. More over, with the advent of comet style web applications, long held requests are common and the apache thread model assigns a thread per outstanding request, so apache does not scale to large numbers of comet connections.
  • Static content. Apache Httpd is very good at serving static content fast. However, Jetty is no slouch either as it can use direct memory mapped buffers for static content, so that only kernel space is used for the data transfer. Besides, if your application has a lot of static content, then you will get much better results by either ensuring good client caching or serving the content from an edge cache.
  • Security. Some believe that apache gives them a more secure solution as there are no TCP/IP connections terminating on Jetty. However, since Jetty is written in Java, it is not vulnerable to the class of security exploit that a server written in C is. Jetty has a good security record, but has had some past issues, but mostly of the nature that would not have been helped by a fronting instance of Apache.

Details

Back to the top