You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Yohan Yudanara <yo...@gmail.com> on 2011/12/29 04:39:36 UTC

Best practice for deploy tapestry app on nginx and tomcat 7

Hi,

I've read somewhere on the internet about deploying application on nginx as
front end server for tomcat.
They say that we better use nginx to serve static content and tomcat for
dynamic content.

Is it true that having nginx/apache as front end server before tomcat will
improve performance?
Should I move away all static content from my web apps and put on nginx?
If the static content serve from nginx. How do I refer to them from
tapestry (how to use @Import with static content on nginx)  ?

I also found similar question on serverfault:
http://serverfault.com/questions/230684/is-it-really-necessary-to-run-apache-as-a-front-end-to-glassfish-jboss-tomcat

What's your opinion and experience regarding this condition?

Thanks in advance...

Best regards,
Yohan Yudanara

Re: Best practice for deploy tapestry app on nginx and tomcat 7

Posted by Kalle Korhonen <ka...@gmail.com>.
On Wed, Dec 28, 2011 at 7:39 PM, Yohan Yudanara
<yo...@gmail.com> wrote:
> I've read somewhere on the internet about deploying application on nginx as
> front end server for tomcat.
> They say that we better use nginx to serve static content and tomcat for
> dynamic content.
> Is it true that having nginx/apache as front end server before tomcat will
> improve performance?

There's no single answer to this question. If anything, the default
answer is that the opposite is true. Together, your architecture is
more complex, you have more layers in between, you need more more
resources to run them etc. However, if you are serving a lot of static
content (i.e. your site resembles youtube, flicker, itunes or some
other site serving media files - not necessarily in volume but in
principle), you could cluster and scale the static content part
separately from your application server if you used a web server
front-end. If it's just the static resources part of your website
style, there's no reason to offload them. Typically, you'd get much
better bang for the buck by offloading your javascript libraries to a
publicly available CDN. But first of all, you should profile your site
and see what type of load eats up your bandwidth before making any
firm decisions. The answers in the linked answer sound reasonable.

Kalle

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org