1

sorry if the question is a bit ambiguous but it is the first time for me to set up a load balancer and I am a little worried.

I want to create a Glassfish Cluster, at the moment I am following this link: http://javadude.wordpress.com/2011/04/25/glassfish-3-1-clustering-tutorial/

In the above tutorial one of the nodes runs also as a load balancer (DAS - Domain Administration Server). In my scenario of course I intend to build 3 nodes, one acting as a load balancer for the other two.

Everything is pretty clear but can anyone give me an idea what to do if the node that acts as a load balancer fails?

Any information will be highly appreciated.

Noah Martin
  • 113
  • 3

1 Answers1

1

I can't speak specifically about glassfish, but it's normal to built failure-resilient LB systems with a pair of LBs, only one of which is active at any one time.

If the LBs are applicances, this is done in hardware - you'll have a pair, usually with some direct connection between the two, for monitoring/heartbeat and sometimes for state exchange. If the LB is software-based and runs on one of the balanced nodes, it's fairly normal to run the second LB on another pool node.

Ensuring that one and only one LB runs at any given time is important, and can't easily be covered here. Particularly for software-based solutions, a good STONITH implementation and appropriate hardware can really help with that.

Edit re your comment: I take your point, but no. Generally the way this is done is to have an infrastructure which is aware that one and only one instance of something - in this case an LB - should be running, and using a floating IP address to handle failover between the two of them. In software, under Linux, this is often done with something like LinuxHA and CRM, running on both primary and secondary LB nodes, which handles the business of ensuring that only one node runs the LB process, and making very sure that primary is dead if it decides to promote the secondary.

MadHatter
  • 79,770
  • 20
  • 184
  • 232
  • Thank you, if I have two LBs, for monitoring them, I will have to implement another LB...? I am a little confused, sorry. – Noah Martin Mar 03 '14 at 11:47
  • 1
    Typically the secondary node monitors the primary and will Shoot The Other Node In The Head (STONITH) before taking over the role of the primary when it detects malfunction. The STONITH implementation is to force the release of all resources held by the primary node, typically by forcing a hard reset. A third "supervisor" is typically not needed. – HBruijn Mar 03 '14 at 12:16