users@glassfish.java.net

Re: Glassfish Clustering with 2 nodes, session replication ...

From: Nazrul Islam <nazrul.islam_at_oracle.com>
Date: Wed, 11 May 2011 19:29:47 -0700

forums_at_java.net wrote:
> Thanks for the answers.
>
> But still I like to know: Can I do session-replication over 2 nodes
> while
> the browser connects to 2 different URL's ? The host is key part of the
> session cookie, right ?
>
Without a loadbalancer, how are you planning to distribute the load
across the instances?

If you pass JSESSIONID=<session id> in the url, it should work. Be aware
that if the requests are distributed at random and not sticky, it will
not be as performant as using with an LB since every request may need to
recover the session from another server instance.

You may find the following demo script (slightly dated - used during
milestone 3 of GlassFish 3.1) useful:

http://wikis.sun.com/display/GlassFish/High+availability+demo+for+3.1+MS3

-- 
Nazrul Islam   -   (408) 276-6468   -   Oracle