Re: httpd vs. Tomcat performance
Hassan Schroeder wrote: Just to get this into the archives for the next time it comes up http://tomcatexpert.com/blog/2010/03/24/myth-or-truth-one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform because I don't know if the author (a certain mthomas) will mention it here. :-) Might this not also be worth preserving in the Tomcat FAQ/wiki ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
2010/3/27 André Warnier a...@ice-sa.com: http://tomcatexpert.com/blog/2010/03/24/myth-or-truth-one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform Might this not also be worth preserving in the Tomcat FAQ/wiki ? There is http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring and it can be updated. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
Thanks for the link. au http://www.xprad.org/ Hassan Schroeder-2 wrote: Just to get this into the archives for the next time it comes up http://tomcatexpert.com/blog/2010/03/24/myth-or-truth-one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform because I don't know if the author (a certain mthomas) will mention it here. :-) (via @springsource on Twitter) -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/httpd-vs.-Tomcat-performance-tp28023360p28056376.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: httpd vs. Tomcat performance
Very entertaining reading! Thanks Chris and Mark for re-benchmarking, explaining, and giving your opinions on the results. I'm not entirely sure how I missed Chris' benchmark results email, almost exactly one year ago now. Chris: there are no units on your results numbers, and I'm not seeing any procedure you used, nor any configurations you used, so I'm not sure how to interpret the numbers. It would be great to get more information about how the benchmark was conducted, which HTTP client was used, and what server hardware was used. I tried to write my benchmark such that it is fully documented and repeatable all the way down to the configuration used on both the client and the server, etc. I also wanted to be completely clear and up front about the specific scenarios I was benchmarking -- there are many more that I wasn't -- so I wrote the explanations into the text as well. The results are, of course, only about the kinds of requests we're benchmarking, and also about the configuration(s) used. I did try to think up and benchmark the most likely use cases for serving typical webapp content, but anyone can say their webapp isn't like that. :) Plus, I tried to write my benchmark to both inspire others to conduct and publish more benchmarks, and also to show a detailed example of one that others could modify and re-use. I was hoping to see more published benchmarks by now, but each one I find is really entertaining. I'm happy to see that Chris' independent benchmark numbers help to show that it is indeed a myth that Tomcat needs HTTPD in front of it in order to get good performance serving static files. And, it's great to see benchmark results for file sizes that I wasn't able to benchmark. Mark: I like your text about some of the other reasons people want to use HTTPD -- it is spot on, and in fact there are so many modules out there for it, there are countless logical reasons to use it. Thanks for the additional analysis. It helps. -- Jason On Wed, Mar 24, 2010 at 5:50 PM, Mark Thomas ma...@apache.org wrote: On 25/03/2010 00:26, Hassan Schroeder wrote: Just to get this into the archives for the next time it comes up http://tomcatexpert.com/blog/2010/03/24/myth-or-truth-one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform because I don't know if the author (a certain mthomas) will mention it here. :-) (via @springsource on Twitter) Chris deserves a lot of the credit. Without his figures, it is just opinion. I'll have to see if I can get the graph to display as well. It is nice to have the hard figures but the graph gives you a quicker handle on the data. Mark
Re: httpd vs. Tomcat performance
Hi , We have a online shop developed as a suite of JSR168 portlets. On some portlets we list products and images (so there are about 25 images per page + other images). One image has around 250k. Performance was greatly improved after we put apache httpd in front (images served by apache gzipped response for js, html, css). We did not note numbers, but the improvement could be seen with naked eye. Now, reading the article, I think we should have tried APR also :) But hei, there are other reasons too for using httpd, such as handful apache modules (e.g. mod rewrite or gzip compression) Note: tomcat 6.0.18, NOT configured with APR running on debian linux sun jdk6 Regards, Marian Simpetru On Thu, 2010-03-25 at 02:39 +0100, Rémy Maucherat wrote: On Thu, Mar 25, 2010 at 1:50 AM, Mark Thomas ma...@apache.org wrote: Chris deserves a lot of the credit. Without his figures, it is just opinion. That's the second benchmark that I see today that has odd numbers. Rémy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
On 25/03/2010 01:39, Rémy Maucherat wrote: On Thu, Mar 25, 2010 at 1:50 AM, Mark Thomas ma...@apache.org wrote: Chris deserves a lot of the credit. Without his figures, it is just opinion. That's the second benchmark that I see today that has odd numbers. What did you think was odd? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
On 25/03/2010 07:01, Jason Brittain wrote: Very entertaining reading! Thanks Chris and Mark for re-benchmarking, explaining, and giving your opinions on the results. I'm not entirely sure how I missed Chris' benchmark results email, almost exactly one year ago now. Chris: there are no units on your results numbers, and I'm not seeing any procedure you used, nor any configurations you used, so I'm not sure how to interpret the numbers. It would be great to get more information about how the benchmark was conducted, which HTTP client was used, and what server hardware was used. Chris's original thread had most, if not all, of that info. I did have a reference to that in the blog post but it looks like it got garbled somewhere in the publishing process. I'll get that fixed. In the meantime, MarkMail should be able to find it. I tried to write my benchmark such that it is fully documented and repeatable all the way down to the configuration used on both the client and the server, etc. I also wanted to be completely clear and up front about the specific scenarios I was benchmarking -- there are many more that I wasn't -- so I wrote the explanations into the text as well. The results are, of course, only about the kinds of requests we're benchmarking, and also about the configuration(s) used. I did try to think up and benchmark the most likely use cases for serving typical webapp content, but anyone can say their webapp isn't like that. :) Indeed. Benchmarks are useful guides to general trends but nothing is going beat benchmarking your own web application with realistic usage patterns. Plus, I tried to write my benchmark to both inspire others to conduct and publish more benchmarks, and also to show a detailed example of one that others could modify and re-use. I was hoping to see more published benchmarks by now, but each one I find is really entertaining. I think the time it takes to do a really good benchmark is a significant barrier. I wanted to do a new benchmark for the blog post but just didn't have the time. It is on the todo list but things like Tomcat 7 and bug fixes keep getting in the way :) Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 3/24/2010 8:50 PM, Mark Thomas wrote: On 25/03/2010 00:26, Hassan Schroeder wrote: Just to get this into the archives for the next time it comes up http://tomcatexpert.com/blog/2010/03/24/myth-or-truth-one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform because I don't know if the author (a certain mthomas) will mention it here. :-) (via @springsource on Twitter) Chris deserves a lot of the credit. Without his figures, it is just opinion. Hey, I could have been making all that stuff up. BTW: the link on that page to performance testing doesn't seem clickable to me (ff 3.6.2). I'll have to see if I can get the graph to display as well. It is nice to have the hard figures but the graph gives you a quicker handle on the data. I'd be happy to give you my raw data plus the graphs I already did. OOo format okay? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuroZQACgkQ9CaO5/Lv0PBulACgwHCDOu1ZeXP1Sufks7zQMWU3 dR8AnjKKnNR/FmYzyP8l3FKsazqAHiyo =WbBv -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
On 25/03/2010 17:47, Christopher Schultz wrote: Mark, On 3/24/2010 8:50 PM, Mark Thomas wrote: On 25/03/2010 00:26, Hassan Schroeder wrote: Just to get this into the archives for the next time it comes up http://tomcatexpert.com/blog/2010/03/24/myth-or-truth-one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform because I don't know if the author (a certain mthomas) will mention it here. :-) (via @springsource on Twitter) Chris deserves a lot of the credit. Without his figures, it is just opinion. Hey, I could have been making all that stuff up. BTW: the link on that page to performance testing doesn't seem clickable to me (ff 3.6.2). I'll have to see if I can get the graph to display as well. It is nice to have the hard figures but the graph gives you a quicker handle on the data. I'd be happy to give you my raw data plus the graphs I already did. OOo format okay? Perfect. Tx. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason, On 3/25/2010 3:01 AM, Jason Brittain wrote: Chris: there are no units on your results numbers, and I'm not seeing any procedure you used, nor any configurations you used, so I'm not sure how to interpret the numbers. I'd be happy to give you a quick explanation, while a complete writeup is still... on the back burner. Those Tomcat people keep putting out new releases and it takes a long time to run all the tests. I have yet to run keepalive versus non-keepalive (well, just the keepalive test) against all the connectors (plus httpd) AND Andre' asked about SSL, so I suppose I'll have to try that, too. Here's the deal: All numbers in the cells are effective transfer rate (in KiB/sec) over an 8-minute testing window: basically, I made as many requests as I could for 8 minutes straight to a single static file (file size listed in the left-hand column) and let ApacheBench tell me what the transfer rate was (which IIRC does not include HTTP headers, etc.: just the file content). It looks like Mark cherry-picked the results with this profile: keepalive=off, concurrency=40, Client VM I also did concurrencies (parallel client threads) of 1, 80, 160, and 200 (I think... I hadn't yet merged that data into my spreadsheet). It's all very repeatable using a set of scripts I wrote for this purpose. It would be great to get more information about how the benchmark was conducted, which HTTP client was used, and what server hardware was used. - From my forthcoming (!) write-up: These tests were performed on a modest machine with a single-core 32-bit microprocessor (see Appendix A for a complete description of the test hardware) and 1GiB RAM. Tomcat 6.0.20, tcnative 1.1.18, and apr 1.3.8 was tested on Sun's Java Virtual Machine 1.6.0_15_b03 (client and server JVMs were tested separately: see the individual tests for details). Apache httpd 2.2.12 was used for comparison. Both httpd and Tomcat were used in their default configurations where applicable (that is, no performance-oriented tuning was performed on either configuration). ApacheBench 2.3 was used to test transfer rates from each server configuration. The tests were run from the local machine to avoid network interference. Unless otherwise specified, all software was kept in it's default configuration. That is, no tuning was performed on any of the components for these tests. I did try to think up and benchmark the most likely use cases for serving typical webapp content, but anyone can say their webapp isn't like that. I stuck to static files because nobody cares what the performance of running a JSP relative to httpd is... since HTTP doesn't serve them :) I'm happy to see that Chris' independent benchmark numbers help to show that it is indeed a myth that Tomcat needs HTTPD in front of it in order to get good performance serving static files. And, it's great to see benchmark results for file sizes that I wasn't able to benchmark. I also intend to show what the overhead is of adding httpd needlessly in front of Tomcat. I suspect that it won't be that bad :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkurqD0ACgkQ9CaO5/Lv0PBTTQCeNdqh/MEeFA0pdrlXtnWNC9qI ZY4AoLNyKI2RyhL64tcEoqDjzlVitqqY =iBpD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
On 25/03/2010 00:26, Hassan Schroeder wrote: Just to get this into the archives for the next time it comes up http://tomcatexpert.com/blog/2010/03/24/myth-or-truth-one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform because I don't know if the author (a certain mthomas) will mention it here. :-) (via @springsource on Twitter) Chris deserves a lot of the credit. Without his figures, it is just opinion. I'll have to see if I can get the graph to display as well. It is nice to have the hard figures but the graph gives you a quicker handle on the data. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd vs. Tomcat performance
On Thu, Mar 25, 2010 at 1:50 AM, Mark Thomas ma...@apache.org wrote: Chris deserves a lot of the credit. Without his figures, it is just opinion. That's the second benchmark that I see today that has odd numbers. Rémy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd/JK/Tomcat hung connections (2009 edition)
On 10.10.2009 16:45, darinpope wrote: I'm having the same issue as documented in: http://www.nabble.com/httpd-JK-Tomcat-hung-connections-td10403182.html For our situation, we haven't hit the server reached MaxClients setting issue yet, but we easily could. Use thread dumps to see, what those threads are doing. We also have this same config running on a Windows cluster and that environment seems to clean up after itself without any issue. Does anyone see any obvious misconfigurations below? Also, in a probably not related issue, when I look at the jkmanager page, I see lots of garbage characters in the RR and CD columns, but only in certain rows. It looks something like: !%���E��*��{ZQ�` l��=��j��8�U���4_~GT��V When I installed mod_jk, I tried the binary as well as compiling the source myself. Both options still showed the garbage characters. Likely not related. Do the garbage characters only appear after graceful restarts? Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: httpd SSL - Tomcat VS. Tomcat SSL standalone?
I believe (intuition, haven't checked) it is the latency the TCP adds to the setup which messes up with the threads scheduler (i'll ellaborate...) When you are in Tomcat only, between the http header coming in (IO) and you sending a response (again IO) you can usually get away with a single time slice. It is a simple system with IO queueing up and very little room for randomness (used in a loose way but you get my meaning). Once the request is divided into two separate workers with IO between them, there are two things coming into play: 1) You are not taking full advantage of the timeslice so there is more context switching (twice the threads doing the same work is another way to look at it). 2) There is more room for randomness in the system. In fact what we observed in the short time we let it run is that there were times it worked and then bursts of high CPU usage with very little happening. Important to note: most of our requests are handled from memory (no IO in the servlet). I believe this is a big part of it. What seemed to help (but not enough in our case) was to reduce the overall number of threads in the system and configure httpd to have less threads than tomcat (strange, I know). I speculate this reduced context switching and reduced the connection load between them. However, throughput was still erratic at times with bursts of very rapid processing followed by periods of indigestion (was not a GC problem). Hope this helps... Yuval Perlov R-U-ON PS It is windows. On Apr 30, 2008, at 4:37 PM, Larry Prikockis wrote: Yuval Perlov wrote: Out tomcat servers are handling around 30K SSL hits every 5 minutes with very little effort (10% cpu average on a dual core machine, good response time). We tried to put in httpd in front thinking we can squeeze out better performance and memory consumption. The system just couldn't handle the load and we had to roll back (quickly) to a tomcat only configuration. hmmm... that sounds suspiciously similar to what we had happening. I just can't see why Apache Httpd wouldn't be able to handle SSL connections at least as well as Tomcat, so there's clearly something else going on here. Is your system on Windows, Linux, something else? And what versions of Tomcat/Apache were you using? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd SSL - Tomcat VS. Tomcat SSL standalone?
Yuval Perlov wrote: Out tomcat servers are handling around 30K SSL hits every 5 minutes with very little effort (10% cpu average on a dual core machine, good response time). We tried to put in httpd in front thinking we can squeeze out better performance and memory consumption. The system just couldn't handle the load and we had to roll back (quickly) to a tomcat only configuration. hmmm... that sounds suspiciously similar to what we had happening. I just can't see why Apache Httpd wouldn't be able to handle SSL connections at least as well as Tomcat, so there's clearly something else going on here. Is your system on Windows, Linux, something else? And what versions of Tomcat/Apache were you using? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd SSL - Tomcat VS. Tomcat SSL standalone?
On Mon, Apr 28, 2008 at 11:27:09AM -0400, Larry Prikockis wrote: I know the latest edition of the O'Reilly Tomcat book by Brittain and Darwin strongly advocates the use of standalone Tomcat as opposed to the traditional httpd-Tomcat approach, but this seems to be somewhat of a paradigm shift for most people. I'm interested in hearing what the wider community thinks... Always do this vs. never do this is a little oversimplified. Some sites will have reasons to run HTTPD anyway, for example, so then you get to choose between using an odd port for Tomcat and front-ending with HTTPD. There might be other reasons (like I *loathe* keytool, for example). Specifically, we have a webapp on a Windows 2003 server that utilizes Apache 2.2 SSL as a frontend and mod_proxy_ajp to send requests to Tomcat 5.5.17 (on the same server). By eliminating the Apache frontend and just using a Tomcat SSL connector directly, we saw performance increases that absolutely dwarfed (400+%) everything else we were achieving by tuning various connection parameters of Apache httpd and Tomcat. That's certainly worth thinking about. What exactly do you mean by performance? o round-trip time for a single transaction? o throughput (pour in transactions as fast as the system will take them, for (say) an hour, and measure how many you completed per second)? o processor utilization under typical load? o something else? My questions: 1) Any thoughts on why the Apache SSL - Tomcat combination should be so much slower? Back-resolving client addresses to names for some reason? (Check your logging directives, for example.) Not enough entropy? Check your random-number generator setup. Some generators will stall until they can gather enough randomness to provide a good result; others will do the best they can immediately; some will mix several sources to produce pretty-good results even when the blocking sources are exhausted. HTTPD is probably using OpenSSL facilities plus its own mixer, and I don't know what your JRE uses. If your processor provides a source of randomness that you trust, be sure it's being used, since a number of sources (keyboard and mouse event timing, for example) are of little use on a server. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgp2vpuHoRzKA.pgp Description: PGP signature
Re: httpd SSL - Tomcat VS. Tomcat SSL standalone?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Larry, Other than Mark's comments... Larry Prikockis wrote: | 1) Any thoughts on why the Apache SSL - Tomcat combination should be so | much slower? If your transactions are short, it's certainly possible that most of the time is taken up by moving bits around. 400% seems like a /very/ high number, especially because the SSL handshake itself is probably the most expensive bit-moving experience. I second Mark's thoughts about either logging configuration or entropy games. Are you using APR with Tomcat, or the Java-based SSL? | 2) Are there any security downsides to using Tomcat SSL directly as | opposed to fronting it with Apache httpd? No. In fact, I would argue that fewer moving parts lowers the chances of problems. You're simply not going to run across any buffer overflows exploits in Tomcat, for instance. I trust Apache httpd pretty well, but more complexity always means more opportunities for problems. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgWF+sACgkQ9CaO5/Lv0PDGlgCguwIuFjVvg/4ZIDwP/59EsVUG 1mUAn0qA48kBzj+ZTG1TYfJgfo58oUwM =yLpu -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd SSL - Tomcat VS. Tomcat SSL standalone?
Out tomcat servers are handling around 30K SSL hits every 5 minutes with very little effort (10% cpu average on a dual core machine, good response time). We tried to put in httpd in front thinking we can squeeze out better performance and memory consumption. The system just couldn't handle the load and we had to roll back (quickly) to a tomcat only configuration. Hope this helps... Yuval Perlov www.r-u-on.com On Apr 28, 2008, at 6:27 PM, Larry Prikockis wrote: I know the latest edition of the O'Reilly Tomcat book by Brittain and Darwin strongly advocates the use of standalone Tomcat as opposed to the traditional httpd-Tomcat approach, but this seems to be somewhat of a paradigm shift for most people. I'm interested in hearing what the wider community thinks... Specifically, we have a webapp on a Windows 2003 server that utilizes Apache 2.2 SSL as a frontend and mod_proxy_ajp to send requests to Tomcat 5.5.17 (on the same server). By eliminating the Apache frontend and just using a Tomcat SSL connector directly, we saw performance increases that absolutely dwarfed (400+%) everything else we were achieving by tuning various connection parameters of Apache httpd and Tomcat. While I would expect hitting Tomcat directly would be a little faster than going through the Apache proxy setup, we didn't expect such dramatic differences. In fact, when comparing Apache w/o SSL - Tomcat, the performance was only a little worse than hitting Tomcat HTTP directly. My questions: 1) Any thoughts on why the Apache SSL - Tomcat combination should be so much slower? 2) Are there any security downsides to using Tomcat SSL directly as opposed to fronting it with Apache httpd? 3) anyone else have any similar (or contradictory?) experiences? thanks- Larry Prikockis -- Larry Prikockis System Administrator [EMAIL PROTECTED] Phone: (240)737-2900 Vecna Technologies, Inc. 5004 Lehigh Rd College Park, MD 20740-3821 Phone: (301) 864-7253 Fax: (301) 699-3180 240-737-1699 (office) www.vecna.com Better Technology, Better World (TM) The contents of this message may be privileged and confidential. Therefore, if this message has been received in error, please delete it without reading it. Your receipt of this message is not intended to waive any applicable privilege. Please do not disseminate this message without the permission of the author. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd SSL - Tomcat VS. Tomcat SSL standalone?
Mark H. Wood wrote: On Mon, Apr 28, 2008 at 11:27:09AM -0400, Larry Prikockis wrote: Specifically, we have a webapp on a Windows 2003 server that utilizes Apache 2.2 SSL as a frontend and mod_proxy_ajp to send requests to Tomcat 5.5.17 (on the same server). By eliminating the Apache frontend and just using a Tomcat SSL connector directly, we saw performance increases that absolutely dwarfed (400+%) everything else we were achieving by tuning various connection parameters of Apache httpd and Tomcat. That's certainly worth thinking about. What exactly do you mean by performance? good point... shoulda been more specific-- we were mainly looking at raw connections per second and throughput type metrics. Under heavy load, we were seeing simple page requests taking 15-20 seconds to return while cpu load, memory usage, free connections (tomcat, apache and database pool) all looked good. My questions: 1) Any thoughts on why the Apache SSL - Tomcat combination should be so much slower? Back-resolving client addresses to names for some reason? (Check your logging directives, for example.) thought of this... but have ruled it out. Not enough entropy? Check your random-number generator setup. thanks! this is definitely something I'll investigate. -- Larry Prikockis System Administrator [EMAIL PROTECTED] Phone: (240)737-2900 Vecna Technologies, Inc. 5004 Lehigh Rd College Park, MD 20740-3821 Phone: (301) 864-7253 Fax: (301) 699-3180 240-737-1699 (office) www.vecna.com Better Technology, Better World (TM) The contents of this message may be privileged and confidential. Therefore, if this message has been received in error, please delete it without reading it. Your receipt of this message is not intended to waive any applicable privilege. Please do not disseminate this message without the permission of the author. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd SSL - Tomcat VS. Tomcat SSL standalone?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Larry, Larry Prikockis wrote: | Mark H. Wood wrote: | That's certainly worth thinking about. What exactly do you mean by | performance? | | good point... shoulda been more specific-- we were mainly looking at raw | connections per second and throughput type metrics. Under heavy load, | we were seeing simple page requests taking 15-20 seconds to return while | cpu load, memory usage, free connections (tomcat, apache and database | pool) all looked good. Yikes! I wonder if Apache httpd was accepting and queuing more connections than Tomcat is doing when Apache httpd is out of the picture. That might cause more delays and fewer errors in your load test. Are you eliminating requests that are outright refused (due to a full server-side request processing queue) from your performance metrics? If so, you may not be comparing the same Apache httpd configuration versus Tomcat. Do you have the same size request queue, request processors, etc. in both configurations? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgWPdMACgkQ9CaO5/Lv0PBY+wCeI8qJpcBwzBzq7vBkcguCG3m0 79cAn2+ua0vMx5DGsSDjwLGAdVxjRKi5 =Mxq0 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd SSL - Tomcat VS. Tomcat SSL standalone?
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Larry, Other than Mark's comments... Larry Prikockis wrote: | 1) Any thoughts on why the Apache SSL - Tomcat combination should be so | much slower? If your transactions are short, it's certainly possible that most of the time is taken up by moving bits around. 400% seems like a /very/ high number, especially because the SSL handshake itself is probably the most expensive bit-moving experience. I second Mark's thoughts about either logging configuration or entropy games. Are you using APR with Tomcat, or the Java-based SSL? Since Tomcat is running on Windows and APR is the default config, that's what we used. | 2) Are there any security downsides to using Tomcat SSL directly as | opposed to fronting it with Apache httpd? No. In fact, I would argue that fewer moving parts lowers the chances of problems. You're simply not going to run across any buffer overflows exploits in Tomcat, for instance. I trust Apache httpd pretty well, but more complexity always means more opportunities for problems. makes sense... thanks... sounds like the biggest downside is the loss of some of the flexibility and load-balancing options that the Httpd/Tomcat combo provide. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd/JK/Tomcat hung connections
Please update mod_jk. 1.2.6 is *very* outdated. We are now at 1.2.22 and a lot of things have improved. After upgrading, check your configuration against the reference guide in the docs, especially the pages for the worker properties and Apache directives. You might want to add some more timeouts. BTW: Maximum Apache parallelity of 150 does not really fit to a maximum tomcat parallelity of 1500 unless your tomcat does serious extra work . Regards, Rainer Brantley Hobbs wrote: All, I have a web application that appears to run just fine at low loads, but when we ramp up to high load levels, strange things start happening. The symptoms are a *ton* of apparently hung threads on the tomcat status page for my JK connector. They're in stage S, with 0KB sent and 0KB recv and they never die. Eventually, we reach a point on httpd where we get: [error] server reached MaxClients setting, consider raising the MaxClients setting And when we reach this point, the entire httpd server stops responding. I post this to the tomcat list because this same server serves PHP under similar (or worse) loads with no problems. Here's my worker properties file: worker.lbJ2EE.balanced_workers=web1 worker.web1.type=ajp13 worker.web1.host=128.192.100.14 worker.web1.port=8009 worker.web1.lbfactor=1 worker.web1.retries=5 worker.web1.connection_pool_timeout=60 Here's my AJP connector's configuration: Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 maxThreads=1500 backlog=300 connectionTimeout=6/ Here's my httpd worker.c configuration IfModule worker.c StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 /IfModule Tomcat 5.5.23 (Sun jvm 1.6.0-b105) Apache 2.0.52 mod_jk 1.2.6 All running on RHEL4 Any help appreciated! I don't have a great deal of Tomcat load tuning experience. Brantley Hobbs - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd/JK/Tomcat hung connections
Rainer, Thanks for the reply! You're certainly right on the JK version. Can you be more specific on the add some more timeouts comment? Do you mean a higher number on connection_pool_timeout? Also, should the relationship between httpd's MaxClients and the connector's maxThreads be 1:1 or what? The httpd server does do additional work besides simply front-ending Tomcat, so I'd assume that we'd want MaxClients to be at least the same as MaxThreads, and probably much more depending on how much additional work the httpd server does. Is this reasonable? I'm just trying to get a handle on the relationships. Thanks, Brantley Rainer Jung wrote: Please update mod_jk. 1.2.6 is *very* outdated. We are now at 1.2.22 and a lot of things have improved. After upgrading, check your configuration against the reference guide in the docs, especially the pages for the worker properties and Apache directives. You might want to add some more timeouts. BTW: Maximum Apache parallelity of 150 does not really fit to a maximum tomcat parallelity of 1500 unless your tomcat does serious extra work . Regards, Rainer Brantley Hobbs wrote: All, I have a web application that appears to run just fine at low loads, but when we ramp up to high load levels, strange things start happening. The symptoms are a *ton* of apparently hung threads on the tomcat status page for my JK connector. They're in stage S, with 0KB sent and 0KB recv and they never die. Eventually, we reach a point on httpd where we get: [error] server reached MaxClients setting, consider raising the MaxClients setting And when we reach this point, the entire httpd server stops responding. I post this to the tomcat list because this same server serves PHP under similar (or worse) loads with no problems. Here's my worker properties file: worker.lbJ2EE.balanced_workers=web1 worker.web1.type=ajp13 worker.web1.host=128.192.100.14 worker.web1.port=8009 worker.web1.lbfactor=1 worker.web1.retries=5 worker.web1.connection_pool_timeout=60 Here's my AJP connector's configuration: Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 maxThreads=1500 backlog=300 connectionTimeout=6/ Here's my httpd worker.c configuration IfModule worker.c StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 /IfModule Tomcat 5.5.23 (Sun jvm 1.6.0-b105) Apache 2.0.52 mod_jk 1.2.6 All running on RHEL4 Any help appreciated! I don't have a great deal of Tomcat load tuning experience. Brantley Hobbs - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd/JK/Tomcat hung connections
Brantley Hobbs wrote: Rainer, Thanks for the reply! You're certainly right on the JK version. Can you be more specific on the add some more timeouts comment? Do you mean a higher number on connection_pool_timeout? Have a look at connect_timeout and prepost_timeout. Usually I also use reply_timeout, but this one not with a very low limit. You connection_pool_timeout looks OK, you might want to increase it for efficiency, but that's not critical. Also, should the relationship between httpd's MaxClients and the connector's maxThreads be 1:1 or what? The httpd server does do additional work besides simply front-ending Tomcat, so I'd assume that we'd want MaxClients to be at least the same as MaxThreads, and probably much more depending on how much additional work the httpd server does. Is this reasonable? I'm just trying to get a handle on the relationships. You are exactly right. Usually the extra work done by Apache is high concerning request counts (e.g. if Apache serves all the static contents), but most of the extra work is done very quickly. So in case you've got 1 Apache and 1 Tomcat, and Apache only serves additional small static content, you can keep the numbers in sync. If there is a n:1 or 1:n relationship (n1), you might need to adjust. If Apache serves long running downloads or scripts, you might also need to give it more allowed parallelity than tomcat. MaxThreads bigger than MaxClients is mostly the case, if you have 2 Apache, 2 Tomcat and each Apache can use both Tomcats. Then you would choose MaxThreads close to 2*MaxClients, so that in case you need to shut down one of your tomcats, the other one will still be able to accept enough connections from both Apaches. Thanks, Brantley Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd/JK/Tomcat hung connections
Rainer, Thanks for all the info. Hopefully we can get this thing whipped into shape. Brantley Rainer Jung wrote: Brantley Hobbs wrote: Rainer, Thanks for the reply! You're certainly right on the JK version. Can you be more specific on the add some more timeouts comment? Do you mean a higher number on connection_pool_timeout? Have a look at connect_timeout and prepost_timeout. Usually I also use reply_timeout, but this one not with a very low limit. You connection_pool_timeout looks OK, you might want to increase it for efficiency, but that's not critical. Also, should the relationship between httpd's MaxClients and the connector's maxThreads be 1:1 or what? The httpd server does do additional work besides simply front-ending Tomcat, so I'd assume that we'd want MaxClients to be at least the same as MaxThreads, and probably much more depending on how much additional work the httpd server does. Is this reasonable? I'm just trying to get a handle on the relationships. You are exactly right. Usually the extra work done by Apache is high concerning request counts (e.g. if Apache serves all the static contents), but most of the extra work is done very quickly. So in case you've got 1 Apache and 1 Tomcat, and Apache only serves additional small static content, you can keep the numbers in sync. If there is a n:1 or 1:n relationship (n1), you might need to adjust. If Apache serves long running downloads or scripts, you might also need to give it more allowed parallelity than tomcat. MaxThreads bigger than MaxClients is mostly the case, if you have 2 Apache, 2 Tomcat and each Apache can use both Tomcats. Then you would choose MaxThreads close to 2*MaxClients, so that in case you need to shut down one of your tomcats, the other one will still be able to accept enough connections from both Apaches. Thanks, Brantley Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: HTTPD with Tomcat
Depending on your layout, with httpd 2.2 there should be a subdirectory named extra within the conf directory. Create an httpd-ajp.conf file inside the extra subdirectory. The following example httpd-ajp.conf file assumes mod-proxy-ajp is statically linked. It should get you started... # Example /conf/extra/httpd-ajp.conf Location /your_app_name/ ProxyPass ajp://localhost:8009/your_app_name/ /Location Depending on the location of your conf directory, add an include statement in httpd.conf similar the the following: # AJP - Apache-Tomcat Include /usr/share/apache2/conf/extra/httpd-ajp.conf From: [EMAIL PROTECTED] Date: 2006/06/07 Wed PM 10:36:09 EDT To: Tomcat Users List users@tomcat.apache.org Subject: Re: HTTPD with Tomcat Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPD with Tomcat
Hi Steven I posted one some days ago to this list. Maybe this is helpful: --- forwarded post --- i'm everthing but an expert in this, but i got loadbalancing with ajp working with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is helpful for you. The documentation on the net about configuration of the new built-in ajp support through the proxy module was rather thin. The best howto i found is in german (the config samples maybe helpful even if the rest is german): http://www.linuxforen.de/forums/showthread.php?t=209010 marc my config: in server.xml: Connector port=9002 URIEncoding=UTF-8 maxThreads=25 minSpareThreads=4 maxSpareThreads=10 enableLookups=false acceptCount=100 protocol=AJP/1.3 request.registerRequests=true / Engine name=Catalina defaultHost=localhost jvmRoute=node1 in httpd.conf : --- IfModule mod_proxy_balancer.c Location /balancer-manager SetHandler balancer-manager /Location Proxy balancer://cluster BalancerMember ajp://localhost:9002 route=node1 BalancerMember ajp://localhost:9102 route=node2 /Proxy Location /axis2 ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID /Location /IfModule Am Donnerstag, 8. Juni 2006 04.36 schrieb [EMAIL PROTECTED]: Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e
Re: HTTPD with Tomcat
Aye, Marc, I saw that. I'm not using proxy_balance, and the server.xml file you posted looks almost exactly like mine (the main difference being the port). Currently I'm defining the proxies for AJP in the httpd.conf file as: ProxyPass / ajp://localhost:8009/ ProxyPass /test ajp://localhost:8009/test And both are still producing the requested resource not available error. Could using the Proxy directive affect the results? Cheers, -- Steven Marc Bächinger wrote: Hi Steven I posted one some days ago to this list. Maybe this is helpful: --- forwarded post --- i'm everthing but an expert in this, but i got loadbalancing with ajp working with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is helpful for you. The documentation on the net about configuration of the new built-in ajp support through the proxy module was rather thin. The best howto i found is in german (the config samples maybe helpful even if the rest is german): http://www.linuxforen.de/forums/showthread.php?t=209010 marc my config: in server.xml: Connector port=9002 URIEncoding=UTF-8 maxThreads=25 minSpareThreads=4 maxSpareThreads=10 enableLookups=false acceptCount=100 protocol=AJP/1.3 request.registerRequests=true / Engine name=Catalina defaultHost=localhost jvmRoute=node1 in httpd.conf : --- IfModule mod_proxy_balancer.c Location /balancer-manager SetHandler balancer-manager /Location Proxy balancer://cluster BalancerMember ajp://localhost:9002 route=node1 BalancerMember ajp://localhost:9102 route=node2 /Proxy Location /axis2 ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID /Location /IfModule Am Donnerstag, 8. Juni 2006 04.36 schrieb [EMAIL PROTECTED]: Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6
Re: HTTPD with Tomcat
This appears to be working. Much appreciated! Cheers, -- Steven Warren Pace wrote: From: [EMAIL PROTECTED] Date: 2006/06/08 Thu PM 06:41:54 EDT To: Tomcat Users List users@tomcat.apache.org Subject: Re: HTTPD with Tomcat Aye, Marc, I saw that. I'm not using proxy_balance, and the server.xml file you posted looks almost exactly like mine (the main difference being the port). Currently I'm defining the proxies for AJP in the httpd.conf file as: ProxyPass / ajp://localhost:8009/ ProxyPass /test ajp://localhost:8009/test Use the Location directive inside httpd.conf and then add the ProxyPass statement. Something like Location /test/ ProxyPass ajp://localhost:8009/test/ /Location Access your app - http://localhost/test/ I've tried omitting the trailing foreslash in both the Location and ProxyPass statements but that doesn't seem to work. And both are still producing the requested resource not available error. Could using the Proxy directive affect the results? Cheers, -- Steven Marc Bächinger wrote: Hi Steven I posted one some days ago to this list. Maybe this is helpful: --- forwarded post --- i'm everthing but an expert in this, but i got loadbalancing with ajp working with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is helpful for you. The documentation on the net about configuration of the new built-in ajp support through the proxy module was rather thin. The best howto i found is in german (the config samples maybe helpful even if the rest is german): http://www.linuxforen.de/forums/showthread.php?t=209010 marc my config: in server.xml: Connector port=9002 URIEncoding=UTF-8 maxThreads=25 minSpareThreads=4 maxSpareThreads=10 enableLookups=false acceptCount=100 protocol=AJP/1.3 request.registerRequests=true / Engine name=Catalina defaultHost=localhost jvmRoute=node1 in httpd.conf : --- IfModule mod_proxy_balancer.c Location /balancer-manager SetHandler balancer-manager /Location Proxy balancer://cluster BalancerMember ajp://localhost:9002 route=node1 BalancerMember ajp://localhost:9102 route=node2 /Proxy Location /axis2 ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID /Location /IfModule Am Donnerstag, 8. Juni 2006 04.36 schrieb [EMAIL PROTECTED]: Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links
Re: HTTPD with Tomcat
you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 -- Filip Hanik - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPD with Tomcat
mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 -- Filip Hanik - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPD with Tomcat
Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPD with Tomcat
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. You should probably try the simplest example first (assuming Tomcat and Apache are on the same machine, and that the AJP/1.3 Connector is using it's default port of 8009): ProxyPass /myapp ajp://localhost:8009/myapp Then you can start on the fancier stuff like: RewriteRule (.*)\.jsp$ ajp://localhost:8009/$1.jsp [P] Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPD with Tomcat
The auto-config Listener has always been somewhat problematic, especially with TC 4.x. At the very least, you need to include in httpd.conf: Include /path/to/catalina/home/conf/auto/mod_jk.conf I don't believe that the Listener really does all that much under the Server tag. Even in TC 5.5.x, you need it under the Engine tag to get simple auto-config. I believe (since I'm not interested enough to look :), that you also need it under the Context tag for TC 4.x. It should be all written up in the FM. Mann, Bradley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]