-----Original Message-----
From: Timothy Stone [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 5:45 PM
To: [EMAIL PROTECTED]
Subject: mod_jk2, load balancing and TC:TDC

What's not clear in the book, or the documentation, is if mod_jk2 on a given httpd instance "autodiscovers" other tomcat? The workers2.properties file given is not clear either. I think it's implied, but poorly. Is this a black mark on an otherwise great book? Possibly.

I think what is being unsaid, is that both HTTPD's workers2.properties files provide tomcatIds that point to the "jvmRoutes" of the respective tomcat. Can anyone clarify? The
book otherwise teases me as I have a production environment that could greatly benefit from upgrading to mod_jk2 v. mod_jk and the topology outlined in the book /TC:TDC/.

Ralph Einfeldt wrote: > httpd instance doesn't "autodiscover" the other tomcat, > you have to configure it. > > I would suggest the following: > > - define distinct propertie fieles for each mod_jk > - define 2 workers for each mod_jk > - each worker points to one tomcat > - set the lbFactor for worker1 to 0 for one mod_jk > - set the lbFactor for worker2 to 0 for the other mod_jk > - define a unique jvmRout for each tomcat > (engine element in server.xml) > > One additional recommendation: > > First setup one apache with two tomcats and loadbalancing: > http://www.ubeans.com/tomcat/ > http://raibledesigns.com/tomcat/index.html > (An updated version of the first link for the apache 2) > > > If that works, try to setup the second apache. > > BTW: In this case it doesn't matter if you use mod_jk or > mod_jk2, both are capable of doing this kind of loadbalancing.

Ralph, thank you.

I have a working production environment using the UBeans tutorial. But I think I was looking to update its design a bit.

If I have the following servers, REED and DOUTRICH, then I need to *update* my worker.properties file as such:

#--------------------------------------
# Tomcat Server One: REED
#--------------------------------------

worker.TomcatREED.port=8009
worker.TomcatREED.host=10.102.1.4
worker.TomcatREED.type=ajp13

# Specify the load balance factor when used with
# a load balancing worker
# Note:
# >>>>> lbfactor must be > 0
# >>>>> Low lbfactor means less work done by the worker.
worker.TomcatREED.lbfactor=100

#--------------------------------------
# Tomcat Server Two: DOUTRICH
#--------------------------------------

worker.TomcatDOUTRICH.port=8009
worker.TomcatDOUTRICH.host=10.102.1.5
worker.TomcatDOUTRICH.type=ajp13

worker.TomcatDOUTRICH.lbfactor=100

I think I had questions about the use of port and host properties. But your suggestions seem to validate what I was thinking needed to be done.

Since the loadbalanced Tomcats are on distinct servers I can use 8009 on DOUTRICH and 8009 on REED. I have to make sure that my host properties is distinct! (I would likely change them for distinguishing reasons however.)

I could drop this config (with a little more detail into each apache (one on REED and one on DOUTRICH) and the tomcats would find each other. This would elimate the a point of failure I now have on each Apache server.

*****

What I have right now is two (2) environments of the UBeans model. Imagine if you will:

For those without the book, here's the ASCII:   +------+
                                           +--->| tc0a |
      ----        +         +------+----+  |    +------+
     /    \--     +   +---->|      |    |--+
   --        \    +   |     +httpd0+-mjk+  |    +------+
  / Internet /--->+---+                    +--->| tc0b |
  \__      --     +   |                         +------+
     \----/       +   |
                  +   |                         +------+
                  +   |                    +--->| tc1a |
                  +   |     +------+----+  |    +------+
                  +   +---->|      |    |--+
                  +         +httpd1+-mjk+  |    +------+
                                           +--->| tc1b |
                                                +------+
                       point of failure...^

If both tomcats on httpd1 go down...opps! no failover to httpd0+mjk

Thanks again Ralph. Comments are welcome.

Tim


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to