tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Tomcat Wiki] Update of "FAQ/Connectors" by KonstantinKolinko
Date Sun, 28 Mar 2010 14:56:52 GMT
Dear Wiki user,

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

The "FAQ/Connectors" page has been changed by KonstantinKolinko.
The comment on this change is: Added a link.


   1. [[#Q6|How do I bind to a specific ip address?]]
   1. [[#Q7|Where can I download a binary distribution of my connector?]]
   1. [[#Q8|I'm having strange UTF-8 issues with my request parameters.]]
+  1. [[#Q9|How do I configure apache tomcat connectors for a heavy load site?]]
  == Answers ==
  <<Anchor(Q1)>>'''What is JK (or AJP)?'''
  AJP is a wire protocol. It an optimized version of the HTTP protocol to allow a standalone
web server such as [[|Apache]] to talk to Tomcat. Historically, Apache
has been much faster than Tomcat at serving static content. The idea is to let Apache serve
the static content when possible, but proxy the request to Tomcat for Tomcat related content.
+ <<BR>>
  <<Anchor(Q2)>>'''Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?'''
@@ -30, +34 @@

   * '''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.
+ <<BR>>
  <<Anchor(Q3)>>'''Why should I integrate Apache with Tomcat? (or not)'''
@@ -43, +50 @@

   * 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)
+ <<BR>>
  <<Anchor(Q4)>>'''At boot, is order of start up (Apache vs Tomcat) important?'''
  No. This way - either apache or tomcat can be restarted at any time independent of one another.
+ <<BR>>
  <<Anchor(Q5)>>'''Is there any way to control the content of automatically generated
mod_jk.conf-auto? I need my own specific commands added to it.'''
  There really is no need to. Just copy the automatically generated mod_jk.conf-auto and edit
it manually to your preference. None of production tomcat installations really use mod_jk.conf-auto
as it is. 
+ <<BR>>
  <<Anchor(Q6)>>'''How do I bind to a specific ip address?'''
- Each Connector element allows an `address` property. See the [[|HTTP
Connector docs]] or the see the [[|AJP
Connector docs]].
+ Each Connector element allows an `address` property. See the [[|HTTP
Connector docs]] or the [[|AJP Connector
+ <<BR>>
  <<Anchor(Q7)>>'''Where can I download a binary distribution of my connector?'''
  You cannot: you need to download the source and compile it for your platform. The source
distributions are available from the [[|standard
location]]. Note that has RPM distributions for the connectors as well as tomcat
itself: [[|]]
+ <<BR>>
  <<Anchor(Q8)>>'''I'm having strange UTF-8 issues with my request parameters.'''
- See [[FAQ/CharacterEncoding|Character Encoding]]
+ See [[../CharacterEncoding|Character Encoding]]
+ <<BR>>
+ <<Anchor(Q9)>>'''How do I configure apache tomcat connectors for a heavy load
+ See [[../Performance_and_Monitoring|Performance and Monitoring]]

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message