Am Montag, den 02.05.2011, 10:06 -0400 schrieb Christopher Schultz:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Felix,
> 
> On 4/30/2011 5:09 AM, Felix Schumacher wrote:
> > The original req, as I understood it:
> > 
> > tomcat1
> >   \-- /abc*  (active)
> >   |-- /def*  (passive)
> > 
> > tomcat2
> >   \-- /abc*  (passive)
> >   |-- /def*  (active)
> > 
> > If one of those tomcat servers shuts down, the other one should be used
> > as failover.
> 
> Yup, that's how I understood things. This should be dead simple, since
> the OP has every webapp configured to essentially configure-on-first-access.
> 
> 1. Deploy all webapps on both servers
> 2. Configure mod_jk to send all requests for apps on tomcat1 to the
> "tomcat1" worker. Configure "tomcat1" worker to have redirect=tomcat2
> (or whatever setting makes that work, if you need jvmroute, etc.).
> 3. Configure mod_jk to send all requests for apps on tomcat2 to the
> "tomcat2" worker -- mirror config to #2 above.
That would be nice, if it would work, but sadly it doesn't. 

redirect is only alowed for a sub-worker, which is referenced indirectly
by a load balancer group.
See http://tomcat.apache.org/connectors-doc/reference/workers.html

And just in case, that the documentation would be wrong, I tested it
with your simple setup. It doesn't redirect.

Regards
 Felix
> 
> > Thus you will have to define a cluster - or rather two clusters -,
> > if you are using mod_jk, as failover and load-balancing are only
> > possible within a cluster.
> 
> I think you only need a "cluster" (i.e. an "lb" worker with multiple
> lb_workers configured) if you want to failover to more than one target
> machine. If the OP just wants to daisy-chain servers like this:
> 
> T1 -> T2 -> T3 -> T4 -> T1
> 
> ... then only "redirect" should be necessary.
> 
> > Two clusters are needed for each webapp group abc* and def*, since the
> > workers can not
> > be in active and passive state at the same time.
> 
> The workers are always active. When mod_jk detects failure of, say,
> tomcat1 worker, tomcat2 worker is used until tomcat1 recovers. At that
> point, the Tomcat2 server has all webapps loaded and will need to be
> bounced to reduce the memory usage (or, at least, all hot-standby
> webapps will need to be re-deployed).
> 
> > Do you think it could be made easier with mod_jk but use two clusters?
> 
> I assert that no "clustering" is necessary at all.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk2+ulsACgkQ9CaO5/Lv0PCLBQCgp2CA7A6AipZSVI1ftltylVFP
> +ucAnAwpzvZFLNFQDbfwSGFkWK0kJ6uz
> =RI96
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> 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

Reply via email to