Re: Apache + Tomcat + Mod_JK + SSL How to?

2005-08-15 Thread Kiarna Boyd



Hi,

I've been following this thread for a bit and can offer some of my 
painfully gained insights. I have Apache, tomcat 5.0.28, mod_jk and 
SSL.

This is not a real fix, just my workarounds.

It drove me nuts forever until I figured out that Apache webserver does 
not successful apply rewrite rules to the JkMount directive.


In my httpd.conf:

#tomcat worker
JkWorkersFile "conf/workers.properties"
JkLogFile "logs/jk.log"
JkLogLevel info
JkMount /*.jsp jkworker


Under my virtual host port 80 I tested a few rewrite rules(the first 
was to the 'admin' directory, the second was for all requests):


RewriteRule ^/admin/(.*)$ https://server.name.com/$1 [R]

RewriteRule ^.*$ https://server.name.com%{REQUEST_URI} [R]

The rewrite would work for non JkMount items, but the behavior seemed 
to show apache just handing off the transaction to tomcat via the mount 
BEFORE applying the rewrite.
(please check this for yourself, if you use a rewrite rule to a non 
JkMount directory Apache should redirect it successfully)


Tomcat would not bounce it to port 443 because the rewrite rule was not 
in the tomcat layer.


Our java programer ended up writing a custom jsp that redirected the 
transaction to a SSL port.

I then made the redirect directory forbidden under non-SSL.

I suspect there maybe a more graceful way to do this please let me know 
if you find it.



-Kiarna

apache/tomcat/mysql cluster info request

2005-07-26 Thread Kiarna Boyd

Good Morning,

I'm looking for suggestions on a large scale tomcat cluster for one 
deployed app.
I currently run our app happily with all server apps smushed on one 
server. Apache webserver 2.0.52/mod_jk/tomcat5.0.28/mysql 4.1.7 on 
Fedora Core 3.
My company wants to deploy a site that would generate a huge amount of 
traffic. Lots of huge files, lot's of CPU use.


I've been reading the online resources for cluster set ups but I still 
have some questions I'm hoping someone who has a successful cluster can 
help with.


I'd like a set up that has redundant pipes, so a horizontal cluster on 
all tiers is important for growth and fail over.
I'm trying to find information about a setup that uses a hardware 
loadbalancer in front of multiple apache webservers that are in front 
of mutliple tomcat app servers with a MySQL master/slave at the back.
I'm thinking the tomcat servers may need to be connected to the 
application data filesystem via a NAS. I'm not sure about the 
performance hit, but it is critical that the data served is shared.


I've read a bunch of great articles on using the apache webserver as 
the loadbalancer for the tomcat cluster, but I'm concerned about the 
webserver failing. Plus I use the webserver tier for rewrite 
flexibility.
I think I want to start with two of each tier(web server, application 
server, database server), with multiple tomcat engines running on the 
application servers on some memory rich hardware.
From my current setup my load tests have always shown the bottleneck to 
be java memory use (jdk 1.5)




Thank you for your time.

-Kiarna