2 Replies Latest reply on Jun 15, 2004 1:08 PM by paulboyce

    How would a Veritas Cluster monitor the health of the JBoss

    paulboyce

      Hi!

      How would a Veritas Cluster monitor the health of the JBoss installation?

      Background
      --------------
      We are deploying a JBoss application to a set of Unix(Solaris) servers monitored by Veritas Cluster Server software.

      The deployment will not be a cluster of JBoss Applications - rather JBoss will be installed on all the servers, but only one server will be "live" at any time.

      In order for the Veritas Cluster software to know when to switch over to another server, it needs to monitor the health of the JBoss installation. If a JBoss installation is not healthy it will automatically switch over to another server.

      How would the Veritas Cluster monitor the health of the JBoss installation?

      Many thanks in advance,
      Paul

        • 1. Re: How would a Veritas Cluster monitor the health of the JB
          pharaohh

          I had to do something similar.

          Using JGroups, we had each jboss server join the same peer group upon startup using an MBean.

          It was very easy. We used an MBean to wrap the JGroups NotificationBus class and join the group upon MBean startup and leave the group upon MBean shutdown.

          NotificationBus detects when a member explicitly joins the group, explicitly leaves the group, and when a member crashes. How this happens is entirely customizable (UDP or TCP multicast or unicast, time until a crash is detected, retry attempts, etc, etc).

          The Veritas Cluster would also run an instance of NotificationBus and join the group to detect when JBoss instances join, leave or crash and act accordingly.

          It took me an hour or two to understand how to use JGroups because of their excellent tutorial - on jgroups.org - and another day and a half to implement the whole thing. Awesome stuff.

          If you just want to play around with it, a JGroups 2.2 jar is already included in JBoss 3.2.x, located in $JBOSS_HOME/server/all/lib/jgroups.jar

          To see how NotificationBus works you can run a neat demo from multiple console windows:

          java -cp $JBOSS_HOME/server/all/lib/jgroups.jar org.jgroups.demos.NotificationBusDemo


          In your case, each console window would simulate a different JBoss installation. Type 'exit' to explicity leave the group or you can just close the window to simulate a crash.

          You can read the JGroups tutorial or browse through the NotificationBus and NotificationBusDemo source code on sourceforge to find out more options and how to use it explicitly.

          NotificationBus also can send and receive messages to/from other members as well as share a distributed object cache. We didn't need any of that and just wanted the notification functionality. Pick what you need.

          JGroups is a stable library, very easy to use, and has a great no-nonsense tutorial. In fact, JBoss uses it as the backbone for its JMS implementation as well as its clustering solution, so you can use it knowing it is capable enough to suit your needs.

          Hope that helps,

          Phar

          • 2. Re: How would a Veritas Cluster monitor the health of the JB
            paulboyce

            Hi Phar - many thanks for yor reply.

            You said: ["The Veritas Cluster would also run an instance of NotificationBus "].

            How would Veritas Cluster run the NotificationBus? Would we need to write an application agent?

            Many thanks in advance,
            Paul