tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tomcat Wiki] Update of "FAQ/Connectors" by ChristopherSchultz
Date Fri, 22 May 2009 15:02:18 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The following page has been changed by ChristopherSchultz:
http://wiki.apache.org/tomcat/FAQ/Connectors

The comment on the change is:
Added notes about Tomcat static file performance, jk options, character encoding

------------------------------------------------------------------------------
  
  [[Anchor(Q2)]]'''Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?'''
  
-  * Stay away from mod_webapp, aka warp. It is deprecated and unsupported due to lack of
developer interest and there are better options such as jk and jk2. It WILL NOT run on windows.
+  * Stay away from mod_webapp, aka warp. It is deprecated and unsupported due to lack of
developer interest and there are better options such as jk and jk2. It WILL NOT run on windows.
'''Do not use mod_webapp or warp.'''
-  * mod_jserv is unsupported and will not be supported in Tomcat 5. mod_jserv was the original
connector which supported the ajp protocol.
+  * mod_jserv is unsupported and will not be supported in Tomcat 5. mod_jserv was the original
connector which supported the ajp protocol. '''Do not use mod_jserv.'''
-  * jk2 is a refactoring of mod_jk and uses the Apache Portable Runtime (apr). But due to
lack of developer interest, it is unsupported. The alternative is mod_jk or mod_proxy_ajp.
+  * jk2 is a refactoring of mod_jk and uses the Apache Portable Runtime (apr). But due to
lack of developer interest, it is unsupported. The alternative is mod_jk or mod_proxy_ajp.
'''Do not use jk2.'''
   * '''mod_jk is great and should be used for production'''. It is still under active development
and also works for the apache 2.X series for cases where you do not want to use mod_proxy_ajp.
   * mod_proxy. A cheap way to proxy without the hassles of configuring JK. This solution
lacks sticky session load balancing. If you don't need some of the features of jk - this is
a very simple alternative.
   * mod_proxy_ajp. With apache 2.2, mod_proxy was rewritten to support load balancing as
well as a new transport called mod_proxy_ajp. This module is distributed with the Apache http
server, not the Tomcat server.
@@ -40, +40 @@

   * Security. This topic can sway one either way. Java has the security manager while Apache
has a larger mindshare and more tricks with respect to security. I won't go into this in more
detail, but let Google be your friend. Depending on your scenario, one might be better than
the other. But also keep in mind, if you run Apache with Tomcat - you have two systems to
defend, not one.
   * Add-ons. Adding on CGI, perl, PHP is very natural to Apache. Its slower and more of a
kludge for Tomcat. Apache also has hundreds of modules that can be plugged in at will. Tomcat
can have this ability, but the code hasn't been written yet.
   * Decorators! With Apache in front of Tomcat, you can perform any number of decorators
that Tomcat doesn't support or doesn't have the immediate code support. For example, mod_headers,
mod_rewrite, and mod_alias could be written for Tomcat, but why reinvent the wheel when Apache
has done it so well?
-  * Speed. Apache is faster at serving static content than Tomcat. But unless you have a
high traffic site, this point is useless. But in some scenarios, tomcat can be faster than
apache. So benchmark YOUR site.
+  * Speed. Apache is faster at serving static content than Tomcat. But unless you have a
high traffic site, this point is useless. But in some scenarios, tomcat can be faster than
Apache httpd. So benchmark YOUR site. '''Tomcat can perform at httpd speeds when using the
proper connector (APR with sendFile enabled). Speed should not be considered a factor when
choosing between Apache httpd and Tomcat'''
   * Socket handling/system stability. Apache has better socket handling with respect to error
conditions than Tomcat. The main reason is Tomcat must perform all its socket handling via
the JVM which needs to be cross platform. The problem is socket optimization is a platform
specific ordeal. Most of the time the java code is fine, but when you are also bombarded with
dropped connections, invalid packets, invalid requests from invalid IP's, Apache does a better
job at dropping these error conditions than JVM based program. (YMMV)
  
  [[Anchor(Q4)]]'''At boot, is order of start up (Apache vs Tomcat) important?'''
@@ -70, +70 @@

  
  [[Anchor(Q8)]]'''I'm having strange UTF-8 issues with my request parameters.'''
  
- Does your connector have Connector declaration have URIEncoding="UTF-8". For example:
+ See [wiki:FAQ/CharacterEncoding Character Encoding]
  
- {{{<Connector port="80"
-            maxThreads="50" minSpareThreads="5" maxSpareThreads="15"
-            disableUploadTimeout="true"
-            URIEncoding="UTF-8"/>  }}}
- 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message