users@glassfish.java.net

Re: Clustering: Why 2 instances on 1 machine?

From: <glassfish_at_javadesktop.org>
Date: Tue, 23 Sep 2008 07:50:46 PDT

Hi:

I'm sorry if Figure 4 caused you confusion.

There is no one best solution for clustering topology. Some people want
to use very small hardware boxes and in that usage, having one instance
per physical machine would be fine. You would be making adequate usage
of your hardware resources and achieving high availability.

But some people want to cluster using bigger, more powerful hardware boxes
where using only a single cluster instance per physical machine would waste
resources. In this situation, Figure 4 is relevant. It is only trying to demonstrate
that by arranging your replication order optimally, you can have more than one
instance per physical machine and still insure that you have redundant replication
data on different physical machines.

As for your other question, GlassFish today makes only a single replica copy
so if (using your example) a stateful session bean is created on instance1, then
it will be replicated to instance2. That's it. And yes, that means that if there
are 2 simultaneous crashes of instance1 and instance2, that you will lose data.
That relates back to Figure 4. If you had put instance1 and instance2 on the
same box, then a single hardware failure would cause a failure of both instance1
and instance2, so that is not a good strategy.
In general, in optimal deployment scenarios, the likelihood of this is usually quite
low.

I hope this helps.
[Message sent by forum member 'lwhite' (lwhite)]

http://forums.java.net/jive/thread.jspa?messageID=301016