users@glassfish.java.net

Re: Glassfish Clustering across 2 Nodes and In Memory Replication

From: Shreedhar Ganapathy <Shreedhar.Ganapathy_at_Sun.COM>
Date: Wed, 24 Jun 2009 14:43:39 -0700

To answer the original question:
"Does the 2 node scenario for clustering and in memory replication
require a web server front end with load balancing or should the in
memory replication work in this basic scenario without the need for a
web server front and and load balancing module? I have modified my
cluster profile under the Availability Service for Web Container to be
both persistence type = memory and replicated, but this has not worked."

You need to set persistence type to "replication" as "memory" would
retain sessions in the heap of the same instance where session was created.
Yes, with multiple machines involved, you need to front the nodes with
an LB either through Apache with mod_jk or Sun Web Server/Apache/IIS
with our LB plugin.
http://weblogs.java.net/blog/arungupta/archive/2009/01/totd_67_how_to.html
has good information and links to useful resources as well.

The issue John points to also is relevant but that's further to the
points from your questions.

The fix for the issue is available in the v2.1 patch for customers and
is in nightly builds of 2.1.1 say build b19. If you can live with
nightly development build in your environment, you could pick v2.1.1 b19.
 
hth
Shreedhar


John Clingan wrote:
> I think you are running into this bug:
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=7200
>
> Per the bug report, you can try a 3-node cluster for your tests to see
> if that works out.
>
> This bug has already been fixed in a patch for GlassFish Enterprise
> Server subscribers. Fix should be available in community release of
> GlassFish v2.1.1 in the fall.
>
> Hope this helps.
>
> John Clingan
> GlassFish Group Product Manager
>
> On Jun 24, 2009, at 2:03 PM, glassfish_at_javadesktop.org wrote:
>
>> I've been testing Glassfish 2.1 and its in memory replication
>> abilities in a cluster. In my first test, it was very simple.
>>
>> I had 1 node and created instance1 and instance2 on that node using
>> the nodeagent on that node as well. The 2 instances were placed into
>> a cluster on that single node. I deployed the clusterjp sample
>> application. I tested in memory replication by entering session data
>> into instance1 and then stopped instance1. When I pulled up instance
>> 2 in the browser, the session data from instance 1 was there, just as
>> I wanted. So it appeared in memory replication was working when
>> everything is on the single node. However, this is of little use.
>>
>> Next, I setup 2 nodes. Node1 and Node2. Node 1 has DAS, instance1,
>> nodeagent1. Node 2 has instance2 and nodeagent2. Both instance1 and
>> instance2 have been added to the cluster, mycluster. Once again, I
>> deploy the clusterjsp application to the mycluster. I performed the
>> same in memory replication test as I had previously done, but this
>> time it appears instance 2 does not get the data from instance 1 when
>> instance 1 is stopped.
>>
>> Does the 2 node scenario for clustering and in memory replication
>> require a web server front end with load balancing or should the in
>> memory replication work in this basic scenario without the need for a
>> web server front and and load balancing module? I have modified my
>> cluster profile under the Availability Service for Web Container to
>> be both persistence type = memory and replicated, but this has not
>> worked.
>>
>> Can anyone provide some assistance?
>> [Message sent by forum member 'radiusmax' (radiusmax)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=352797
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>