I use the ajp13 connector built into Tomcat. It talk to the ajp module for Apache (I had to compile it from source because my apache has EAPI compiled in for mod_ssl, and the only binary I found doesn't do EAPI). I'm using Tomcat 4 and Apache 1.3, but ajp works with many Tomcats and Apaches (I didn't use the newer warp connector because it doesn't do load balancing).
The main reason I use Apache is so I have flexibility. Load balancing and performance are gravy. I don't want people getting directory listings, nor do I want them messing around in my templates folder, etc. With Tomcat, you only have limited ability to control these things. Plus, with apache, you can use mod_rewrite and other cool modules (mod_speling, etc). All the images are served by apache, but the site is 98% VM's and served by Tomcat. One performance boost I get on top of the faster images is that Apache is doing the SSL, which we use quite a bit. I only have to configure SSL in one place, and I don't have to mess with JSSE or keytool (I was using a pkcs12 (not jks) .keystore file generated with openssl - that was tricky, but I don't like keytool). The Tomcat configuration becomes trivial, because all I have to enable is the ajp - no http connectors are running, I don't have to mess with SSL or proxying, and they can run as any unix user. Check out: http://www.ubeans.com/tomcat/index.html (thank you Pascal - this page rocks) and http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html The Apache box is the only machine that needs to be public, and the Tomcat workers can be on the same machine, or any combination of machines and platforms, possibly on another lan or even elsewhere on the 'net (slow). I run them on the same machine right now, but I plan to put them other unix boxes on my back-end lan (alongside the db's) to get real pseudo-clustering. The AJP load balancer supports session affinity, and seems to be fairly robust when nodes are taken up and down (failover and failback). I have had to restart apache in certain cases, but that doesn't affect the session affinity, and only happens when I do odd things with the Tomcat workers. One thing I like is that I can take a Tomcat down, take my time upgrading the code or OS or whatever, then bring it back up. When it's back up, I can take anohter one down and repeat the process until everything's upgraded. If persistent, shared sessions are used, you'd never notice any downtime. Another plus is that my access/error logs are all in one place instead of one set per server (like with an IP load balancer). I haven't found any real drawbacks yet, but I'm sure there are a few. You need to know how to configure Apache, but hey, it's a standard (and you don't need to learn so much about server.xml)! Hope that wasn't too long. I get a little carried away sometimes. -Jeff ----- Original Message ----- > I'm curious. What do you use for load balancing your Tomcat servers? I > have never had the need to do it but would like to know what is available if > I ever do. > > Thanks, > Scott ----- Original Message ----- From: "Eric Pugh" <[EMAIL PROTECTED]> To: "'Turbine Users List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 12, 2002 10:03 AM Subject: RE: AW: New site powered by turbine! > Excellent.. The best way I learn is by seeing sample code, and hearing from > other users! Getting rid of ? is very easy, just use addPathInfo versus > addQueryData and it handles it all for you.. It took me a bit to get used > to ,'s as well in the path, but now it seems very natural... > > When you said you are using apache and ajp? What is ajp.. My app has very > little static code or images, so I have not bothered to tackle integrating > apache or other webserver front ends... > > Eric -- > > I also need to tune performance and do some caching here and there, but > right now the site runs on one box and is fast enough. I deployed it using > ajp on apache with two tomcat instances under it, with the load balancing. > I thought I might have bugs that could crash a JVM, so I ran 2 JVM's. No > crashes yet. > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
