users@glassfish.java.net

Re: Achieving Load balancing + HA on two servers

From: Pankaj Jairath <Pankaj.Jairath_at_Sun.COM>
Date: Wed, 17 Sep 2008 18:21:37 +0530

Hello Anzy,

Apparently you have a configuration where in your n/w traffic can enter
via only on server and this server is also playing the role of LB. For
sure you need to ensure that this n/w interface point is high available
(and not single point of failure).
You can achieve this by introducing redunancy in the overall deployment
- provide more than one entry point for external traffic and degree of
availability would vary as you build redundancy at different levels -
network, m/c, application server, etc.

Some quick examples:

* DNS based solution : wherein clients can still access the other server
via the DNS round robin. This would require you to expose each instance
as an external http endpoint. Though this come with limitations of DNS
caching in clients and time to propagate changes in the network of DNS
mapping change.

* Front end your m/c with a highly available n/w element (ip sprayer)
which is able to spray requests to servers. Note such h/w elements also
provide for stickiness of requests.

* Deploy your servers over a monitoring and provisioning setup such
that, which at the least would replenish the failed server instance. For
ex: provides for backup servers which in the scenario of an active
instance failing would assume the role of the backup. For ex: Open HA
cluster - http://opensolaris.org/os/community/ha-clusters/ohac/

regards
Pankaj


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
>
>