tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: clustering and jvmRoute
Date Fri, 23 Feb 2007 08:32:59 GMT
It works, because clustering means session replication. Any changes to 
sessions are replicated to the other cluster members, so any member can 
server any session, even if no member failed.

But: with stickyness (different jvmRoutes and a session sticky load 
balancer) you only rely on the correctness of the replication when a 
node actually fails. Since replication takes a little time and is very 
difficult to implement, that's the better strategy.



Kristian Rink wrote:
> Folks;
> yesterday I dealt with the tomcat clustering feature for the first
> time, getting things basically set up and working in quite a short time
> (thanks to the documentation which is rather good), and even made my
> application distributable / the session attributes serializable really
> fast. However, one thing is massively confusing me:
> I followed the straightforward approach, reading through [1] where
> there is a configuration file in a section named "Simple Engine Cluster
> Configuration for all hosts" - without thinking twice, I installed a
> configuration similar to that on both of the nodes of my cluster
> (including the _same_ jvmRoute parameter on both machines) and it
> worked - no matter which one of the nodes went down, my session
> remained alive and well.
> However, spending some more time trying to study the details and
> options of clustering, I came across [2] and learnt that the jvmRoute
> parameter should be a per-host not a per-cluster configuration.
> Thinking twice about this and its implications on session replication,
> this seems reasonable, and looking at the log of mod_jk while running
> both tomcats with the same jvmRoute parameter, indeed I see requests
> belonging to the same session processed by different nodes (which, if I
> got the servlet specifications right, shouldn't be). So: Why does this
> setup, having jvmRoute the same in all cluster nodes, work? Just an
> undesired side-effect of a broken configuration? Luck? Is there
> something I didn't yet get about the cluster configuration?
> Thanks in ad
> [1]
> [2]

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message