2 Replies Latest reply on Aug 11, 2010 10:09 AM by paul_navteq

    HA and cluster discovery

    paul_navteq

      I'm having trouble getting HA to work, and would like some more info regarding live/backup pairs with regard to broadcast groups and cluster discovery.

       

      We have a live/backup pair, configured according to the HA examples.  The live appears to see the backup, because it throws errors if the backup isn't started first, or the backup data is different.

       

      We also have clustering enabled, and the clients and servers are using discovery groups.  (With only 1 live/backup pair in the cluster to start with.)

       

      Discovery works fine for the live server, the clients find and connect and use the live server.

       

      However the backup is never broadcast, and the live server doesn't seem to publish the information about the backup in the cluster discovery messages...

       

      I set a breakpoint in ClientSessionFactoryImpl connectorsChanged(), so I could see the DiscoveryEntry/Pair values being received.  There is never a backup/b server listed in the pair.

       

      So the question is... does the live server know about it's backup, and broadcast that information in the discovery group? 

       

      There's no example that I can find for HA and clustering together.  Could someone maybe post some example configs that use both features at the same time?

       

      Maybe there's something needs to be configured in the discovery-groups or cluster-connections sections in the XML?  I can post my configs files if necessary.

       

      Thanks

      Paul

        • 1. Re: HA and cluster discovery
          clebert.suconic

          Clustering and HA are different things on HornetQ.

           

          Backup nodes are configured as noted on chapter 39 : http://hornetq.sourceforge.net/docs/hornetq-2.1.1.Final/user-manual/en/html/ha.html

           

           

          Discovery is used on clustering, not on backup nodes.

          • 2. Re: HA and cluster discovery
            paul_navteq

            Solved...

             

            I was missing the attribute "backup-connector-name".  So to configure the broadcast group with live/backup pair, the broadcast configuration has to look something like this:

             

               <broadcast-groups>
                  <broadcast-group name="bg-group1">
                     <group-address>231.7.7.7</group-address>
                     <group-port>9876</group-port>
                     <broadcast-period>5000</broadcast-period>
                     <connector-ref connector-name="netty" backup-connector-name="backup"/>
                  </broadcast-group>
               </broadcast-groups>

             

            With that change, the live server broadcast it's backup, and automatic client failover works.

             

            -Paul