tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GOMEZ Henri <hgo...@slib.fr>
Subject RE: Tomcat 4 Cluster -- plans?
Date Tue, 06 Nov 2001 08:57:26 GMT
Some comment here about clustering support
from ideas I've got to add this kind of 
support to Tomcat 3.3 also via mod_jk/ajp14,
having sus a perfect match for Apache -> Tomcat
farms allready supported by mod_jk/ajp13.

a) When session is serialized the data could be 
   send back to Apache server for example 
   with reply. The web-server keep the serialized
   data (in any db supported by the server like db3,
   or in mmap file...). When session data is updated
   the whole stuff is resent to Apache which will
   replace it with the new one.

   When mod_jk detect that a tomcat is down, it locate
   another tomcat on the farm and if session data 
   is available for that request, send the serialized
   data together with the request.
   On reception, the tomcat create the session and 
   feed it with serialized data.

b) Another possibility is that Tomcat write the serialized 
   session data to a SQL server for example, and send back
   a key to Apache server.

   In case of failure, mod_jk send that key to the new tomcat
   which will create the session and feed it with data from 
   the SQL backend.

This solution avoid complexity and platform problems with
multicast sockets. Using a SQL backend or just sending 
stuff to WebServer is a choice, both solution could be
implemented and tested. 

The housekeeping will be easy.
When a session has expired or explicitly dropped, we just have
to delete the SQL record and/or send a clear session command
(with list of session key to be removed) to web-server with 
the next reply sent back. 

The overhead in both case is serialization of session data,
and transmitting data/key in case a) and key in case b).

Of of the advantage of SQL solution, is that it could works
on X * Web-Server -> Y * Tomcat architecture. 

In that case we could add the KEY somewhere on HTTP header for example.
When a tomcat engine discover that key, and detect that there is
no session loaded on memory, it will create the session automatically 
after getting (successfully) the serialized data (and of course if the
session is still valid).

table could be :

string key;
date   validity;
blob   serializeddata;

What do you think of it ?

-
Henri Gomez                 ___[_]____
EMAIL : hgomez@slib.fr        (. .)                     
PGP KEY : 697ECEDD    ...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-----Original Message-----
>From: Mika Goeckel [mailto:mika@stepstone.de]
>Sent: Monday, November 05, 2001 1:08 AM
>To: tomcat-dev@jakarta.apache.org
>Subject: Tomcat 4 Cluster -- plans?
>
>
>Hi,
>
>I've browsed through org.apache.catalina.cluster and have some 
>ideas about
>further development there. Before I start to mess around with 
>it I would
>like to ask if anyone here already has started working.
>My superficial inspection gives me the impression that sessions are
>replicated (through the MulticastSender/Receiver) to all 
>cluster members.
>This is propably the savest way doing it, but leads to a lot 
>of replications
>that will never been used in clusters with more than two nodes. Afaik
>WebLogic replicates to only one other instance which means 
>that the cluster
>can provide fail over if one node goes down.
>I'd like to think how that can be achieved.

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message