users@glassfish.java.net

Re: High Availability Session Persistence does not work.

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Oct 2007 04:08:44 PDT

In fact, there is another way to check HASP.
My colleague made this test:

nstall glassfish. Configure cluster:

cd glassfish
ant -f setup-cluster.xml
cd bin
./asadmin start-domain
./asadmin create-node-agent --host 10.30.40.6 --port 4848 first-agent
./asadmin create-cluster --host 10.30.40.6 --port 4848 my-cluster
./asadmin create-instance --host 10.30.40.6 --port 4848 --nodeagent first-agent --cluster my-cluster instance1
./asadmin create-instance --host 10.30.40.6 --port 4848 --nodeagent first-agent --cluster my-cluster instance2
./asadmin start-node-agent --syncinstances=true first-agent

So two insances have bean created with listeners on ports 38080 and 38081.

I've checked hardware load balancing with iptables and clusterjsp.ejb help.
I've choose port 38000 as access port from browser.

Test procedure:

    * forward port to insance1:

iptables -t nat -A PREROUTING -i eth0 -d 10.30.40.6 -p tcp --dport 38000 -j DNAT --to 10.30.40.6:38080

    * run some requests to clusterjsp.

    * remove forwarding:

iptables -t nat -D PREROUTING 1

    * forward port to insance2:

iptables -t nat -A PREROUTING -i eth0 -d 10.30.40.6 -p tcp --dport 38000 -j DNAT --to 10.30.40.6:38081

    * run some requests to clusterjsp.

    * remove forwarding:

iptables -t nat -D PREROUTING 1

I realize that simple hardware load balancing doesn't work for session state HA.
[Message sent by forum member 'constantinius' (constantinius)]

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