tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Drake" <...@pobox.com>
Subject Re: How Session-Replication works when clustering Apache/Tomcat
Date Wed, 30 Jan 2002 15:24:30 GMT
Alexander:

Currently, Tomcat 4 doesn't really do session
replication. However, I've been working on a
clustering / distributed session management
solution that should work beautifully in the
the scenario you describe below.

The way it works is that all tomcats in the
cluster are given the same 'cluster multicast ip/port'
information (via server.xml). At startup time,
tomcat will discover all the session replication
(RMI) services, and obtain copies of sessions already
stored elsewhere in the cluster.

If a tc instance is required to create a new session
or update an existing session, it will, on completion
of the HttpServletRequest, persist that session to
all known session repositories in the cluster.

If a request for an 'unknown' jsession id comes to a
tc instance, it will query one of the other 'session
repositories' in the cluster, and obtain that session.
Normally, it would already have a copy of the session
because of what I described in the preceeding paragraph.

There is more to this, but this description is a fairly
accurate yet simple description.

I've completed (and tested) the multicast RMI registry
code which enables the auto-discovery of RMI services.

I've also completed (and tested) the distributed
object management code.

I've also done some of the integration work including
- a new SessionManager that performs the required
  interactions with the 'other' repositories in the cluster.
- a new Valve that notifies the new SessionManager when an
  HttpServletRequest is complete (so that it can then persist
  the new or changed session across the cluster).

But I've yet to properly integrate the session / object
repository into Tomcat such that it's lifecycle is properly
managed.

I really should have finished this all weeks ago, but I've
been pounding the pavement looking for a paying gig, as
resources are getting a bit thin around my place.

Regards,

Tom

----- Original Message -----
From: <lad@commaro.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Wednesday, January 30, 2002 6:48 AM
Subject: How Session-Replication works when clustering Apache/Tomcat


| Hi everybody,
|
|
| to distribute the load of client requests of our web application and to
| guarantee reliability we have to do hardware load balancing and use two
| redundant web servers.
| For that we have to cluster Apache 1.3.23 with Tomcat 3.3a on our
machines.
|
| The file (sketch.txt) shows a scenario with our actual
| hardware-architecture:
|
|                         (2)
|                     __\____/____
|          webserver1 |Ap\ac/he &|
|                     | To\/mcat | <- Session-ID (3)
|                    /|___/\_____|
|                   /    /  \  ||
|                  /           ||
|         ________/_           ||
|         |  HW-   |           || (4) Session-
|     (1) |Balancer|           ||     Replication??
|         |________|           ||
|                 \            ||
|                  \           ||
|                   \          \/
|                    \____________
|                     | Apache & |
|          webserber2 |  Tomcat  | <- Session-ID?? (5)
|                     |__________|
|
|
| Look at following scenario:
|
| For example, if a user logs in he gets his own session ID. The hardware
| load
| balancer decides to forward his request to webserver1 and some information
| of
| this session is stored on that machine.
| Then the same user sends a request again but webserver1 is not reachable
| anymore
| of any reasons! Of course the hardware load balancer forwards his request
| to
| webserver2. How that machine gets the previous session information?
|
|   - Is it possible to configure Tomcat 3.3a in that way to do Session
|     Replication?
|   - Is there any plugin to install for Tomcat 3.3a to guarantee this?
|   - Or have I implement that for my own?
|
|
| Of course I've searched in the internet to get information about it and
| read
| almost all newsletters on jakarta's website. But I didn't found any useful
| information.
|
|
|
| With kind regards,
|
| Alexander Ladinig
| System Architect
|
|
| --
| To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
| For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
| Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
|
|
|


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message