On Tue, Jun 23, 2009 at 11:45 AM, Musachy Barroso<musa...@gmail.com> wrote:
> Struts adds overhead for serving static content. Not that I have ever
> done any benchmarking on it, but I know that at my company(large
> online retailer), just suggesting to serve static content thru tomcat
> instead of apache is a big offense.
>
> musachy
>

I had a similar experience at a large online content provider. At the
time, we were bouncing back and forth between tomcat and resin. We
used mod_jk and mod_caucho for integration between httpd and the app
servers. I hate it when rules exist, but there is no data to backup
the rule's existence.

A SysAdmin that I was good friends with and I sat down and performed a
series of benchmarks in our dev lab. The results were not something
that can easily be generalized (we were testing many different
parameters, not just serving static content, things like "hello world"
through SSI vs JSP), but we found that even under heavy load, Tomcat
and Resin were capable of keeping up with httpd. The biggest factor
was JSP compilation (obviously). In our case, we solved that by
crawling sites as part of deployment. On particularly heavy traffic
sites, we would deploy to the app server, crawl it, then open up
traffic from the load balancers.

Even after the benchmarks, we never changed the way sites were
deployed. I think the argument went something like the following -
protagonist - "I don't see any reason to put httpd out in front of
that app, it will only add unnecessary configuration overhead."
antagonist - "Well, we always put httpd out front because it is highly
optimized and fast at serving static content."
protagonist - "That's not necessarily true, we have data that
indicates that tomcat/resin are just as fast with static content,
which sort of makes sense considering how easy it is to find a
resource then serve it, I mean, what advanced techniques do you think
httpd employs?"
antagonist - "Well, we always put httpd out front because it is highly
optimized and fast at serving static content."

That being said, I generally put the app servers behind a copy of
httpd for configuration not performance. I can't say whether httpd has
more options than Tomcat or vice versa. I have been using httpd so
long, and writing CGI long before writing JSP, so I am just more
familiar with httpd's advanced configuration options (host header
based vhosting, bandwidth throttling, etc.).

-Wes

-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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

Reply via email to