I sent an email to you about this for your last post
Here it is below, even though your kind of asking a slightly different
set of questions, but to answer some of your other questions here I go.
I have tested http Java direct over the Internet with 'ab' and for what
ever reason it just returns less requests/sec compared to using Apache
infront of it, one possibility of why this its like that is maybe Java
uses more CPU time dealing with a higher latency tcp connection.
There are many advantages of running Apache in front of tomcat, such as
being able to server static data directly, for example just put
ProxyPass /static/ !
This will not pass anything in the whole static dir to Tomcat and have
Apache server it directly it self.
I have being using Apache/Tomcat setups in apache 1.3/2.0/2.1/2.2 and
Tomcats 3.x 4.1.x 5.0.x and 5.5.x
And I believe that the latest Apache 2.2 and Tomcat 5.5.9 are the best
combination, mod_proxy_ajp for connectors does give best performance but
your more likely to get the odd few 503 status errors to peoples
browsers under high load.
Also you can run php in Apache alongside Tomcat.
Use Apache2.2 which is the latest release stable version of Apache over
the 2.1 series which are just experimental betas and should never be
used in an production environment, but the 2.1 series have shown that
2.2 is really ready to go straight into production use as far as I am
I have been testing with Apache 2.2 which seems to have tons of little
things that are much better about it over the old 2.0 Apache series, one
big one is the new built in AJP protocol module for Tomcat, I am using
Tomcat 5.5.9 which appears to work better with AJP then Tomcat 5.0.x.
As long as you aren't under extreme load AJP gives the best performance
but if you really push the load on the server you might get 503 status
errors in Apache logs, but using AJP does perform more requests/sec
because it uses less CPU over using mod_proxy HTTP style connectors to
I use a portupgrade command for the apache22 port to install the proxy
modules and worker MPM via a single portupgrade command.
portupgrade -RrN -m 'WITH_MPM=worker -DWITH_PROXY_MODULES'
Make sure you have 'LoadModule proxy_ajp_module
libexec/apache22/mod_proxy_ajp.so' enabled in httpd.conf
Then in the virtual host directive of Apache link it with Tomcat 5.5.9
ProxyPass /javacontext ajp://127.0.0.1:8009/javacontext
Fr?d?ric de la Goublaye wrote:
> I used FreeBSD 6.0.
> I need to use Tomcat to serve jsp servlet and database.
> I choose sqlite because the data will also
> be accessible via a local C++ application on the user computer.
> I wonder what is the fastest solution :
> - use Tomcat alone on port 80
> - use Tomcat with Apache22
> What is the best combination for using Tomcat ?
> Alone or with Apache ?
> I know that not using Apache may avoid me from using all nice PHP
> solutions like phpBB and so on ... also PHP5 can used sqlite
> but I still wonder what is the fastest solution.
> Thanks for help
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "[hidden email]"