If the session hasn't replicated to node 2 from node 1 by the time the
second request comes in it is one of these problems:

For your #1
1. Your sessions are way to big
2. You are not using the useDirtyFlag="true" flag, instead you have it set
to false, hence replicating way too much.
3. Your network is to slow
4. My implementation sucks

For your #2
Yes, this is a problem. Tomcat starts listening for requests before the
server is updated. The way around this is to put a longer sleep (right now
it sleeps two seconds) before the continuation of the code. If you want I
can add that in for you, or I can send you the source and you can fix it
yourself.


Filip


----- Original Message -----
From: "David Rees" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Filip Hanik" <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 9:48 PM
Subject: Tomcat 4 Replication problems


I've been testing Tomcat 4.1.27 replication for our application with
tomcat-replication 1.01.  I've found two issues.

My test setup involves one Apache 1.3 with mod_jk in front of two Tomcats
with the identical configuration.  The Session replication is setup
identically to what's on http://cvs.apache.org/~fhanik/.

1. When sticky session are not enabled (jvmRoute is not set for the Engine
in Tomcat) and mod_jk is balancing requests across the two Tomcat's, if a
session is modified on one Tomcat and you get sent to the other Tomcat,
(for example if you are redirected) sometimes the session will not yet
have replicated to the other Tomcat and you will not see the updated
session.  Using sticky sessions solves this problem, but I did not see
this issue noted anywhere.  I can not think of a way to solve it except
for sticky sessions unless you can somehow guarantee that the session is
replicated before the next request comes in.

2. Sticky sessions are enabled.  Both Tomcats are running and they both
have a copy of the replicated session.  I can disable either Tomcat and
mod_jk will move the client to the other Tomcat without any problems.  But
say I have a session on Tomcat1.  I then disable Tomcat1.  At this point,
mod_jk starts sending me to Tomcat2.  I later start up Tomcat1 again while
continuing to make requests.  It seems that if I make a request that gets
sent to Tomcat1 too early (I think the replicated sessions have not yet
been downloaded from Tomcat2) Tomcat1 generates a new session for the
client and I lose the benefits of session replication.

Any ideas?

-Dave


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

Reply via email to