tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: pure tomcat failover (no loadbalacing)
Date Mon, 02 May 2011 14:06:19 GMT
Hash: SHA1


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.

> 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
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message