Hi,

> I use JBoss2.2.2+Tomcat3.2.2 (for JBoss as my EJB container 
> and Tomcat as my
> JSP and Servlet container). I have a lot of static content 
> such as HTML
> files, images, etc. which need to be served as well. Do I 
> need an external
> web server such as Apache for serving the static content? 
> What are the +/-
> of using Tomcat for everything vs. Apache for some of the 
> stuff? Would some
> one please provide me some guidance? I hope there are some 
> documents which
> talk about this.

We have developed a site with quite high load on the static content and much
more lower load on the active content (JSPs, etc.). Currently we have load
approx. 3-5 requests per second (up to 10 mln. page hits per month) on
static content  and approx. 1 request per minute (:-)) on JSPs (usually
login, change profile info, etc.). JSPs talk to JBoss.

In this case we do have almost all CPU dedicated to apache processes
(sometimes up to 100 apache processes). Tomcat's JVM "eats" approx. 0.15%
CPU (JBoss is running on another host, same 0.15% CPU).

So, this configuration is pretty nice if you have high amount of static
content, basically static site, with some active areas (user account
management, etc.). We did not try to put Tomcat's built in authentication,
rather used Apache.

So, summary is the following Apache vs. Tomcat:

+ Apache serves static content much more better than Tomcat :)

+ Somebody reported that Tomcat stalls at approx. 40 simultaneous requests.

+ Linux usually treat 100 apache better then one JVM with 100 threads inside
(my personal opinion, no serious tests were made); I have no idea about
Solaris and Windows.

- In Apache+Tomcat configuration seems that you cannot use the Tomcat
built-in authentication (and therefore intergration with JBoss on JAAS), at
least I do not know that.

- If served static content depends on some dynamic data (public content for
all, public and protected for logged users), you hardly can use Apache
(however, I may be wrong, maybe mod_jk does have so tight integration, but I
do not expect it to).

Personally, I would use Apache anyway, even for delivery of images, JSP can
determine what image to include and what not to include, Apache will just
deliver the stream. Also, with mod_jk you can load balance multiple Tomcats,
however, beware that sessions are local to Tomcat.

Hope this helps.

Regards,
Roman

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to