You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Raul Valenberg <ra...@usa.net> on 2001/04/20 17:42:15 UTC

Re: [HA and failover - Re: saving session attributes across server machines]

Hi and thanks for the response.
I started to look more closely at this issue, and found an interesting article
in JavaWorld April 01. This article explains how build a clustered Servlets
Engines environement. It discusses 3 possibilities: (a) Centrelized Database,
(b) JavaSpaces and (c) Replication between servlets.

The article link is:

http://www.javaworld.com/javaworld/jw-04-2001/jw-0413-servlets.html

I would be happy to recieve any feedback from users who faced the same problem
of building a truely robsut clustered environment for Web, Servlet-based
applications.

Raul.

David Crooke <da...@convio.com> wrote:
We are using a strategy where the information in the Java VM (session and
site-wide) is a read cache of what is in a relational database; any update is
persisted immediately, and there is a cache invalidation mechanism between
appservers. Since like most web apps we have a high read to write ratio
(something like 97% of pageviews are database read operations) this is highly
effective.

The one place where the facade breaks in our model is if a user has completed
half the steps of a multi-step form "wizard", then if an appserver fails in
the
middle they lose their half-completed state and have to start over.

Bear in mind though that this is a *failure* condition. How common is an
appserver crash? How important is it to never lose a session?

I took the view that one session in a few million having this happen, when it
is
easily recoverable by the user (just redo the form) was far more acceptable
than
the considerable cost and slowdown of persisting the session state to the
database on every single pageview.

Likewise, our database setup only supports warm failover - if a DB server
crashes, it takes the other one 4 or 5 minutes to warm start that DB
instance,
and meanwhile a number of our sites will be down. But how often does one
crash?

You have to make an economic business decision about what level of fault
tolerance you require. With Java servlets, a multi-tiered cluster of machines
and a good RDBMS it is not difficult to assemble an extremely fault tolerant
system, just make sure that it is *necessary* first :-)

Cheers
Dave

Raul Valenberg wrote:

> Hi,
>
> We are designing a Web application with Servlets and JSPs that has to run
on
> several machines in a fail-over mode. Each machine also has to participate
in
> the workload as longs it is up. Furthermore, our requirements state that if
a
> user session begins at one server, the fail-over to another server would be
> transparent to the client.
>
> I am looking for the right combination of technologies for this case.
> Does anyone have any experience with these kind of requirements using
Tomcat?
>
> I though about using SUN JavaSpaces technology as a backbone for the Tomcat
> servers.
> Does this sounds logical? Has anybody have any experience with this type of
> combination?
>
> Thanks.
>
> Raul.
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

Re: [HA and failover - Re: saving session attributes across server machines]

Posted by Tim O'Neil <ti...@xythos.com>.
This is a good link, for one thing it had a link to
another article that explains the stateless nature
of the http protocol as I understand it:

http://www.javaworld.com/javaworld/jw-12-2000/jw-1221-servlets.html

"What is a session?
The interaction between a Web browser and a Web server is stateless. The 
browser connects to the server, requests a single piece of information, 
then disconnects, at which point the server completely forgets about the 
transaction and awaits the next request. Sessions are traditionally used to 
create a state for Web-based communications. Essentially, they are 
dictionaries of name-value pairs that persist from one request to the next."

I thought we could all benefit from this after the discussion from
the other day on this topic.

At 09:42 AM 4/20/2001 -0600, you wrote:
>Hi and thanks for the response.
>I started to look more closely at this issue, and found an interesting article
>in JavaWorld April 01. This article explains how build a clustered Servlets
>Engines environement. It discusses 3 possibilities: (a) Centrelized Database,
>(b) JavaSpaces and (c) Replication between servlets.
>
>The article link is:
>
>http://www.javaworld.com/javaworld/jw-04-2001/jw-0413-servlets.html
>
>I would be happy to recieve any feedback from users who faced the same problem
>of building a truely robsut clustered environment for Web, Servlet-based
>applications.