4 Replies Latest reply on Apr 23, 2015 1:37 AM by fharms

    HA mode and replication

    fharms

      Hey

       

      I have question if it possible to setup 2 nodes in HA and with replication? Because when I read the documentation I get the understanding this it will require minimum 3 nodes

       

      Much like in the shared-store case, when the live server stops or crashes, its replicating backup will become active and take over its duties. Specifically, the backup will become active when it loses connection to its live server. This can be problematic because this can also happen because of a temporary network problem. In order to address this issue, the backup will try to determine whether it still can connect to the other servers in the cluster. If it can connect to more than half the servers, it will become active, if more than half the servers also disappeared with the live, the backup will wait and try reconnecting with the live. This avoids a split brain situation.

       

      Thanks!

      /Flemming

        • 1. Re: HA mode and replication
          clebert.suconic

          It will work, however if the connection between live and backup is not reliable you may get a split brain problem.

           

          So, it's ok as long as the connection is reliable.

           

           

          We are looking into adding Zoo Keeper through newer versions on activemq-artmis (next generation). We haven't been able to do the proper announcements yet but hornetq was donated to apache-activemq, and we are moving the dev there. think about this as hornetq-3 but doing it as part of activemq, and think about activemq doing their next version with us.

          • 2. Re: HA mode and replication
            fharms

            I would suggest the documentation is updated with this piece of information, because I have been discussing this with others that are having the same interpretation, and it's a shame if they disregard HornetQ because of this.

             

            Congrats on the alliance between hornetq and activemq!

            • 3. Re: HA mode and replication
              jbertram

              Just to be clear, the phrase, "If it can connect to more than half the servers, it will become active," gives you the impression that a live/backup pair using replication requires 3 servers?

              • 4. Re: HA mode and replication
                fharms

                Yes I read it takes 3 or more nodes to work with replication. With 2 nodes it's not able to connect to more of than half the backup servers, and since it's the only one left it can't know if this is a split brain and it bail out.

                 

                That's the reason I was asking because it didn't make sense to me, it sounded like it was a requirement to use 3 or more servers to use the replication strategy, unless you choose the shared-store case instead.