users@glassfish.java.net

Re: Achieving Load balancing + HA on two servers

From: Kshitiz Saxena <Kshitiz.Saxena_at_Sun.COM>
Date: Wed, 17 Sep 2008 18:09:38 +0530

Hi Anzy,

I am not sure why you getting 404 when HOST1 network is plugged out. You
should get error like "unable to connect" to HOST1, as it is not reachable.

About HA, you can set up lbplugin on HOST2 as well. Then you can
front-end the web-servers running on HOST1 and HOST2 with hardware
load-balancer. Also you can check linux kernel solution for load-balancer.

Thanks,
Kshitiz


glassfish_at_javadesktop.org wrote:
> Hey Folks
>
> I am kinda new to glassfish. In one of our requirements we need to set up loadbalancing and achieve HA using two servers. SO here is what I did :
>
> On HOST2
> Created node agent 'node2' with reference of HOST1 (Also Acting as DAS)
>
> On HOST1 (Also acting as DAS)
> Created domain -> Created node-agent 'node1' -> Created Cluster 'cluster1' -> created two instance in the cluster, one of each node, node1 and node2 -> deployed application on cluster -> Started the cluster
>
> After doing this I was able to access the sample application at following url
> http://host1:38080/clusterjsp
> http://host2:38080/clusterjsp
>
> Then on HOST1 i deployed lbpluigin and made changes in obj.conf and magnus.conf as required -> ran asadmin commands to create lb config, enabled cluster on lb, enabled applications -> exported conf to loadbalancer.xml ->copied loadbalancer.xml to webserver instance's conf directory. -> deployed the conf through WADM deploy config -> restared server instances through DAS.->restarted webserver
>
> After doing this I was able to access the sample application at following url
> http://host1/clusterjsp
> (virtual server's listener IP is 80)
>
> Then I conducted following tests :
>
> I checked the access log of both host1 and host2 and verified that the requests are being distributed. Test Passed
>
> Stopped the instance on host 2 and checked that lb reroutes the traffic to instance at host1 : Test Passed
>
> Stopped the instance on host 1 and checked that lb reroutes the traffic to instance at host2 : Test Passed
>
> I unplugged the network cable of HOST2 and hit the url http://host1/clusterjsp. Traffic redirected to HOST1.Test passed
>
> NOW : THE COMPLICATION OCCURS.
> I unplugged the network cable of HOST1 and the url http://host1/clusterjsp returns 404 not found . TEST FAILED
> ____________________________________________________________________
> [b]AND HERE IS THE QUESTION :What if HOST1 goes down completely, say because of power failiure. The url http://host1/clusterjsp will not return anything as the LB which was configured on HOST1 itself has stopped running.[/b]
>
> What could be the workaround to achieve 100% HA on a setup involving two servers ?
>
> Any kind of quick help will be highly appreciated.
> ____________________________________________________________________
>
> Thanks
> anzy
> [Message sent by forum member 'anzy' (anzy)]
>
> http://forums.java.net/jive/thread.jspa?messageID=299799
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>