Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, Since my ears (eyes?) are burning... On 11/24/2009 6:09 AM, Peter Crowther wrote: 2009/11/24 TheGrailer ken...@gmail.com: The most compelling argument from the Apache2 and Tomcat 6-friend was indeed the static content part. http://tomcat.markmail.org/message/il33wqqjb2dok6xz might be illuminating - along with the discussion around it on that thread. I suspect Chris will be making his own comments on this thread, as he knows his benchmarking results better than anyone! Yes, I'm getting ready to get back into that benchmarking... that field has laid fallow for quite a while and I just freed-up a dev server to do some testing, so I'm basically formalizing everything, properly documenting it so that my tests can easily be repeated, and upgrading to Tomcat 6.0.20 for all testing, etc. Anyhow, the upshot from all the testing I've done is that if you are using small files ( 32KiB), all connectors (in Tomcat) in all configurations perform about the same: this includes using Tomcat-native (aka APR, which is the httpd code mentioned elsewhere). If the argument is that httpd is faster by definition, then using the APR connector with Tomcat ought to be just as fast, so you get no discernible performance boost by using httpd out front. My data has httpd versus Tomcat+APR+sendFile in a dead heat for nearly all file sizes, with Tomcat+APR winning at certain points, losing at others. I suspect this is just noisy data that can be attributed to a cron job or two running during the tests. If you want my advice, use the APR Connector and make sure you specify sendFile=true and you'll be able to prove your httpd fanboy wrong. :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksYHVgACgkQ9CaO5/Lv0PDnWwCgrGi12feuuHICV0QB8TGDg7aG ppsAniVmIsuzEHDPOD6LlqJlVi/vHkRE =OANy -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6 and Apache2 VS Tomcat 6 alone
Hi, Im pretty new to this but have 2 friends that help me out. Though one of my friends tells me to use Apache2 infront of Tomcat and the other one tells me it's unnecessary. I'll try to explain my situation: I've started a virtual Ubuntu 8.04 Longterm server and my goal is to have atleast one serious site (made in Grails) and beeing a search engine (think youtube). So it's gonna be pretty much dynamic content and less static. But I will also start some sites just for fun that probobly won't have that much visitors but beeing abit more static content. Im not saying my primary site will get much visitors but I want to build the environment as if it has. Ps. I will probobly put a Varnish at the front sooner or later (for the experience) So what do you all think? Is the Apache2 infront of the Tomcat 6 a waste of time or worth while? I'd love to have as many inputs as possible! -- View this message in context: http://old.nabble.com/Tomcat-6-and-Apache2-VS-Tomcat-6-alone-tp26493078p26493078.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
On 24/11/2009 09:47, TheGrailer wrote: Hi, Im pretty new to this but have 2 friends that help me out. Though one of my friends tells me to use Apache2 infront of Tomcat and the other one tells me it's unnecessary. Single server? Tomcat alone is just fine. I'll try to explain my situation: I've started a virtual Ubuntu 8.04 Longterm server and my goal is to have atleast one serious site (made in Grails) and beeing a search engine (think youtube). So it's gonna be pretty much dynamic content and less static. But I will also start some sites just for fun that probobly won't have that much visitors but beeing abit more static content. You said static, which I'd guess means that you've had the somewhat out of date Apache HTTPD is faster at serving static content conversation. Im not saying my primary site will get much visitors but I want to build the environment as if it has. Ps. I will probobly put a Varnish at the front sooner or later (for the experience) So what do you all think? Is the Apache2 infront of the Tomcat 6 a waste of time or worth while? Well, if you look at it from the point of view that HTTPD + Connector + Tomcat is a longer codepath, then it ought to be less performant to use both, no? Tomcat comes with a library called APR, which is the the same code library that Apache HTTPD uses. Install that Tomcat is as fast as its sibling, simply by dint of the fact that they use the same code. I'd love to have as many inputs as possible! I'd hazard a(n educated) guess that the comments will be largely one sided from this list. p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
2009/11/24 TheGrailer ken...@gmail.com Im pretty new to this but have 2 friends that help me out. Though one of my friends tells me to use Apache2 infront of Tomcat and the other one tells me it's unnecessary. Finding out their reasoning - and the evidence each one has supporting their point of view - would be interesting. I'll try to explain my situation: I've started a virtual Ubuntu 8.04 Longterm server and my goal is to have atleast one serious site (made in Grails) and beeing a search engine (think youtube). So it's gonna be pretty much dynamic content and less static. But I will also start some sites just for fun that probobly won't have that much visitors but beeing abit more static content. Im not saying my primary site will get much visitors but I want to build the environment as if it has. Ps. I will probobly put a Varnish at the front sooner or later (for the experience) So what do you all think? Is the Apache2 infront of the Tomcat 6 a waste of time or worth while? As always, it depends on your environment, wishes and skills. Tomcat has a reputation for being slow to serve static content. For 5.5+, that reputation is not deserved - you'll saturate your network connection long before you run out of CPU. So the old reason to put Apache httpd (hereafter just httpd) in front of Tomcat no longer applies. If you add httpd, you also need to add a connection between httpd and Tomcat. More moving parts, more to maintain, higher CPU, use, higher memory use and higher latency on all requests that go to Tomcat. If you add httpd and don't configure the connection carefully, it's quite easy to expose the source of your JSPs and your webapp configuration - which may expose passwords, for example. So poor configuration of httpd+Tomcat can be a security risk. httpd can act as a very effective load-balancer for Tomcat if you don't want to use a hardware load-balancer. httpd has modules that are faster at serving non-Java dynamic content (PHP, perl etc) than Tomcat's CGI. httpd has mod_security, which may aid in site security if correctly configured (and can be a real PITA if not correctly configured). Pick the points from the above that apply to your site, and decide whether it's right for you. There is no Right or Wrong answer. - Peter
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
TheGrailer: So what do you all think? Is the Apache2 infront of the Tomcat 6 a waste of time or worth while? I agree with what Pid and Peter already said. Just to phrase it with my own words: I see two major reasons why you'd want to put httpd in front of Tomcat 1. To act as a load balancer for multiple Tomcats. 2. To serve dynamic content written in something that Tomcat isn't able to process as good as httpd (if at all), for example PHP. Judging from what you wrote, neither seems to apply to your case. Nevertheless it would be interesting to hear why your friend, who advocates the use of httpd, thinks this additional complexity is justified. In my experience, simply having some static content to serve, isn't a justification. -- Regards mks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
Markus Schönhaber-10 wrote: TheGrailer: So what do you all think? Is the Apache2 infront of the Tomcat 6 a waste of time or worth while? I agree with what Pid and Peter already said. Just to phrase it with my own words: I see two major reasons why you'd want to put httpd in front of Tomcat 1. To act as a load balancer for multiple Tomcats. 2. To serve dynamic content written in something that Tomcat isn't able to process as good as httpd (if at all), for example PHP. Judging from what you wrote, neither seems to apply to your case. Nevertheless it would be interesting to hear why your friend, who advocates the use of httpd, thinks this additional complexity is justified. In my experience, simply having some static content to serve, isn't a justification. -- Regards mks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org To start with, thanks for your input! I can almost certainately say I won't go other than Java/Groovy so PHP and all that won't be needed. And my Tomcat alone-friend thought I should go Varnish if I was to load balance with 2 Tomcats or something like that, but that's a different story. Not Apache2 anyway. -- View this message in context: http://old.nabble.com/Tomcat-6-and-Apache2-VS-Tomcat-6-alone-tp26493078p26493902.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
2009/11/24 TheGrailer ken...@gmail.com: The most compellig argument from the Apache2 and Tomcat 6-friend was indeed the static content part. http://tomcat.markmail.org/message/il33wqqjb2dok6xz might be illuminating - along with the discussion around it on that thread. I suspect Chris will be making his own comments on this thread, as he knows his benchmarking results better than anyone! But also confing like virtual hosts (hard in pure tomcat?) Easy in pure Tomcat. Outlined at http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html (assuming version 6.0.x). and modules. Which ones might you want? The commonest would be a mod_rewrite, for which http://tuckey.org/urlrewrite should work just fine. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
On Tue, Nov 24, 2009 at 11:56 AM, TheGrailer ken...@gmail.com wrote: And my Tomcat alone-friend thought I should go Varnish if I was to load balance with 2 Tomcats or something like that, but that's a different story. Not Apache2 anyway. So one of your friends suggests httpd for static content and virtual hosts, and another of your friends suggests varnish as loadbalancer. Maybe you should hang around with your friends drinking beer and stuff, but ask real experts when it comes to deployment questions ;-) regards Leon - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
On Nov 24, 2009, at 3:09 AM, Peter Crowther wrote: 2009/11/24 TheGrailer ken...@gmail.com: The most compellig argument from the Apache2 and Tomcat 6-friend was indeed the static content part. http://tomcat.markmail.org/message/il33wqqjb2dok6xz might be illuminating - along with the discussion around it on that thread. I suspect Chris will be making his own comments on this thread, as he knows his benchmarking results better than anyone! But also confing like virtual hosts (hard in pure tomcat?) Easy in pure Tomcat. Outlined at http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html (assuming version 6.0.x). It would be easier if you could keep your host configuration separate from the server.xml, similar to contexts. For example, the file system would look like: -tomcat |-conf |-server.xml |-Catalina |-locahost.xml (the host config) |-localhost |-webapp1.xml |-webapp2.xml Hmmm... wonder how ward it would be to implement this? Do you see any problems? -Rob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
On 24/11/2009 11:57, Robert Koberg wrote: On Nov 24, 2009, at 3:09 AM, Peter Crowther wrote: 2009/11/24 TheGrailerken...@gmail.com: The most compellig argument from the Apache2 and Tomcat 6-friend was indeed the static content part. http://tomcat.markmail.org/message/il33wqqjb2dok6xz might be illuminating - along with the discussion around it on that thread. I suspect Chris will be making his own comments on this thread, as he knows his benchmarking results better than anyone! But also confing like virtual hosts (hard in pure tomcat?) Easy in pure Tomcat. Outlined at http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html (assuming version 6.0.x). It would be easier if you could keep your host configuration separate from the server.xml, similar to contexts. For example, the file system would look like: -tomcat |-conf |-server.xml |-Catalina |-locahost.xml (the host config) |-localhost |-webapp1.xml |-webapp2.xml Hmmm... wonder how ward it would be to implement this? Do you see any problems? You might be able to achieve it with XML includes. I recall previous discussion on the list describing this as possible - why not give it a try report back? p -Rob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
On Nov 24, 2009, at 4:12 AM, Pid wrote: On 24/11/2009 11:57, Robert Koberg wrote: On Nov 24, 2009, at 3:09 AM, Peter Crowther wrote: 2009/11/24 TheGrailerken...@gmail.com: The most compellig argument from the Apache2 and Tomcat 6-friend was indeed the static content part. http://tomcat.markmail.org/message/il33wqqjb2dok6xz might be illuminating - along with the discussion around it on that thread. I suspect Chris will be making his own comments on this thread, as he knows his benchmarking results better than anyone! But also confing like virtual hosts (hard in pure tomcat?) Easy in pure Tomcat. Outlined at http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html (assuming version 6.0.x). It would be easier if you could keep your host configuration separate from the server.xml, similar to contexts. For example, the file system would look like: -tomcat |-conf |-server.xml |-Catalina |-locahost.xml (the host config) |-localhost |-webapp1.xml |-webapp2.xml Hmmm... wonder how ward it would be to implement this? Do you see any problems? You might be able to achieve it with XML includes. I recall previous discussion on the list describing this as possible - why not give it a try report back? Yes, I remember. I think I was going to look at it back then :) The problem with XML Include or (even worse) DTD defined entities is that if the included file is changed (the host files are set to be watched, because it would not appear the server.xml has changed) it would currently need to reconfigure the whole server (I think). It would be better if tomcat could recognize just one host haas changed and reload it. Haven't had a major itch here, so just throwing it out :) best, -Rob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
On Nov 24, 2009, at 4:30 AM, Robert Koberg wrote: On Nov 24, 2009, at 4:12 AM, Pid wrote: On 24/11/2009 11:57, Robert Koberg wrote: On Nov 24, 2009, at 3:09 AM, Peter Crowther wrote: 2009/11/24 TheGrailerken...@gmail.com: The most compellig argument from the Apache2 and Tomcat 6-friend was indeed the static content part. http://tomcat.markmail.org/message/il33wqqjb2dok6xz might be illuminating - along with the discussion around it on that thread. I suspect Chris will be making his own comments on this thread, as he knows his benchmarking results better than anyone! But also confing like virtual hosts (hard in pure tomcat?) Easy in pure Tomcat. Outlined at http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html (assuming version 6.0.x). It would be easier if you could keep your host configuration separate from the server.xml, similar to contexts. For example, the file system would look like: -tomcat |-conf |-server.xml |-Catalina |-locahost.xml (the host config) |-localhost |-webapp1.xml |-webapp2.xml Hmmm... wonder how ward it would be to implement this? Do you see any problems? You might be able to achieve it with XML includes. I recall previous discussion on the list describing this as possible - why not give it a try report back? Yes, I remember. I think I was going to look at it back then :) The problem with XML Include or (even worse) DTD defined entities is that if the included file is changed (the host files are set to be watched, because it would not appear the server.xml has changed) it would currently need to reconfigure the whole server (I think). It would be better if tomcat could recognize just one host haas changed and reload it. Haven't had a major itch here, so just throwing it out :) Additionally, if you added a new host, you would need to edit the server.xml to add a reference to it. It would be much nicer if it worked like context config files. The file system currently being used for tomcat seems perfectly set up for such a thing. best, -Rob best, -Rob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[OT] Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
On 24/11/2009 12:34, Robert Koberg wrote: On Nov 24, 2009, at 4:30 AM, Robert Koberg wrote: On Nov 24, 2009, at 4:12 AM, Pid wrote: On 24/11/2009 11:57, Robert Koberg wrote: On Nov 24, 2009, at 3:09 AM, Peter Crowther wrote: 2009/11/24 TheGrailerken...@gmail.com: The most compellig argument from the Apache2 and Tomcat 6-friend was indeed the static content part. http://tomcat.markmail.org/message/il33wqqjb2dok6xz might be illuminating - along with the discussion around it on that thread. I suspect Chris will be making his own comments on this thread, as he knows his benchmarking results better than anyone! But also confing like virtual hosts (hard in pure tomcat?) Easy in pure Tomcat. Outlined at http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html (assuming version 6.0.x). It would be easier if you could keep your host configuration separate from the server.xml, similar to contexts. For example, the file system would look like: -tomcat |-conf |-server.xml |-Catalina |-locahost.xml (the host config) |-localhost |-webapp1.xml |-webapp2.xml Hmmm... wonder how ward it would be to implement this? Do you see any problems? You might be able to achieve it with XML includes. I recall previous discussion on the list describing this as possible - why not give it a try report back? Yes, I remember. I think I was going to look at it back then :) The problem with XML Include or (even worse) DTD defined entities is that if the included file is changed (the host files are set to be watched, because it would not appear the server.xml has changed) it would currently need to reconfigure the whole server (I think). It would be better if tomcat could recognize just one host haas changed and reload it. Haven't had a major itch here, so just throwing it out :) Additionally, if you added a new host, you would need to edit the server.xml to add a reference to it. It would be much nicer if it worked like context config files. The file system currently being used for tomcat seems perfectly set up for such a thing. I don't believe that the config parser can cope with making dynamic changes to the server's structure. It is possible to make fairly significant changes via JMX. p best, -Rob best, -Rob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] Re: Tomcat 6 and Apache2 VS Tomcat 6 alone
From: Pid [mailto:p...@pidster.com] Subject: [OT] Re: Tomcat 6 and Apache2 VS Tomcat 6 alone Additionally, if you added a new host, you would need to edit the server.xml to add a reference to it. It would be much nicer if it worked like context config files. The file system currently being used for tomcat seems perfectly set up for such a thing. I don't believe that the config parser can cope with making dynamic changes to the server's structure. It is possible to make fairly significant changes via JMX. Additional Host elements do *not* need to be specified in server.xml - you can add and remove them on the fly with Tomcat's host-manager (not manager) webapp. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org