I've seen a lot of discussion on the best way to use Apache as a proxy (either mod_proxy or mod_jk) with Glassfish (and other Java application servers), but I haven't seen anybody really explain why.

My setup right now is a single VPS running Ubuntu Server with Glassfish accepting HTTP requests on port 8080 (iptables forwards port 80 requests to port 8080 so I don't have to run Glassfish as root). I run a few small websites.

My site is divided into two main parts: static and dynamic. They are each on a separate subdomain. It would be easy to handle the static content with Apache (or another web server) and then use Apache as a proxy for the dynamic content, but is there any reason to do that?

If I were to use Apache, it would ideally have to run in less than 100 MB of memory to save room for everything else running.

Using a recent application server (Glassfish 3), will I get any performance benefit by using Apache as a proxy?

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

How good is Glassfish at serving static content? Name-based vhosting? Redirects? I'm willing to bet that Apache is better at it all. If you're particularly interested in a small footprint frontend webserver, though, look at nginx instead of Apache.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.