Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dale,

On 7/19/2010 7:42 PM, Dale Ogilvie wrote:
Reasons to use httpd being what?

Here are a few ideas:

1. Load balancing
2. Use of mixed Java and non-Java webapps (PHP, Perl, etc.)
3. Use of multiple Tomcat instances behind a single web server

If I thought about it, I could come up with a few more.

4. Imperative/beneficial use of one of the multiple Apache built-in or add-on modules which exist for Apache, and where comparable ready-made Tomcat valves, filters, applications do not (yet) exist or are not as mature.
(ref : http://httpd.apache.org/docs/2.2/mod/)

5. Situations where running java webapps under a servlet engine is not the main focus/purpose/interest of a website, but things like 2. above are. I'll enclose in that the situations where the main area of competence of the people developing or managing the website is not Java.

To round this off, I'd say that the "right" tool for a job does not depend only on the intrinsic qualities of the tool itself. It also depends on many other local circumstances, of which the availability of people with the appropriate competences is probably the most important. From a relative outsider's point of view, I would compare Apache httpd and Tomcat as follows :

To achieve anything other than relatively trivial with Tomcat, at some point you'll need to become very competent with Java. Being competent with Java is a lifetime occupation, not because of the language itself, but because achieving anything worthwhile with it requires learning about many, many class libraries and their API's.
(Anyone challenging the above ?)

In comparison Apache httpd has, built-in, many features that just require configuration, and already has many ready-to-use add-on modules which just require to be plugged-in and configured, without having to do any programming at all.
This may suit "sysadmins types" better than "developer types".

In both cases, some knowledge of the HTTP protocol is a must, and a good knowledge of HTTP is a tremendous help. To achieve a certain goal, if you have a choice, choose whatever you are more comfortable with.

Technically, I think that Christopher's earlier benchmarks showed that Tomcat can serve simple static content at least as well as Apache httpd. Using Apache httpd as a front-end to Tomcat introduces some overhead, but with a correct configuration this overhead will be insignificant in most real-world situations, compared to what can be achieved (in terms of unnecessary overhead) by bad coding in the applications themselves, whether they are running under Tomcat or under Apache. To connect Apache with Tomcat, you can use either mod_jk or mod_proxy_ajp (or just mod_proxy_http). Again, each one has its advantages and inconvenients, and you should mainly choose whichever you feel more comfortable with. The difference in performance between these solutions will likely be insignificant, compared to the mistakes in configuration and in the applications.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to