tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gal Shachor <>
Subject Re: How to use or implement distributed Sessionmanagment
Date Mon, 29 May 2000 13:01:48 GMT

"Lentz, Robert" wrote:
> Hello everybody,
> I am facing the problem of running 2 Tomcat servers on different machines
> (load balancing). At the moment I am not using http session, but I have to.
> I 'd like to use http session on both or even more Tomcat servers and they
> should appear as one "big Tomcat  server" with shared http sessions.
> Are there any suggestions how this could be done?

Are you using Tomcat as the second layer with Apache/Other web server as
front layer? If this is true then last time I checked (prior to the
release of 
v3.1) tomcat supported sticky load balancing where the apache servers
balanced the work for the tomcat processes and also made sure that
requests that
are part of the same session arrives to the same tomcat process.

If you are using Tomcat by itself you should either:
1. Implement clustered session state using a database (not recommended
   you really know what you are doing).
2. Buy a clustered session state package and integrate that into tomcat
   I do not know if there is such package for sale)

In any case you should also:

3. Use load balancing router with affinity support (for example
e-network dispatcher
   localdirector and the like) or buy a linux solution
( with
   load balancing built into the ip stack. I am not a big round robin
DNS believer and 
   this should make your single ip real.

Since option (3) is usually a must for reasonable single system image
you may want to
end up with:

1. Load balancing layer - say a router or TurboCluster.
2. "File server" layer - apache servers serving your flat files
3. Application layer - Tomcat processes serving JSP/Servlets/DB
4. (maybe) A Database layer where you place your data.

This should scale really good both up and down and should not cost too
much (last time
I checked a 2 node TurboCluster cost about 1K$).

	Gal Shachor

View raw message