3 Replies Latest reply on Apr 16, 2012 2:26 PM by Radoslav Husar

    mod_cluster clustering setup for AS7 for strict failover (no lb)

    marmotadev Newbie

      Hello,

       

      I want to setup a strictly failover cluster (strictly no load balancing). To be more exact I want only 1 active server and other servers „on standby“.

      The reason for this is Application (jbpm console server application) that is not designed to be clustered. So I need:

      either: those standby nodes are really standby and no applications are running on them until they are in standby

      either: those standby servers could be in running state, but no HTTP requests are routed to them until active (main) server is alive. After main server dies, second server goes up and redeploys (or destroys and creates servlet context - restarts) JAX-RS application

      Could I achieve this with mod_cluster? I've look through documentation and see no guides on doing this. In mod_cluster documentation, section "Migration from mod_jk" I can see a comment near  mod_jk property  "redirect":

       

      redirect

      -

      The nodes with loadfactor = 0 are standby nodes they will be used no other nodes are available

       

      So this behaviour with loadfactor = 0 - Is this a part of mod_cluster or of mok_jk? Will other nodes have their applications started?

      And If I setup all nodes with loadfactor = 0, I assume only 1 server will be active at a time (or will it happen otherwise: if no loadfactor !=0 servers are left, all   loadfactor =0  servers will be equally load-balanced?)

      Can I achieve this with:

       

      <subsystem xmlns="urn:jboss:domain:modcluster:1.0">

       

                  <mod-cluster-config>

                      <simple-load-provider factor="0"/>

                  </mod-cluster-config>

      </subsystem>

      ?

       

      Any more hints on this solution (If this cannot be achieved with mod_cluster what specific open source products - modules, proxy/balancers can be used to achieve this?)

        • 1. Re: mod_cluster clustering setup for AS7 for strict failover (no lb)
          Radoslav Husar Master

          Hi marmotadev,

           

          either: those standby nodes are really standby and no applications are running on them until they are in standby

          Interesting question. In AS4/5/6 you can do this with https://community.jboss.org/wiki/HASingletonDeployer and have physically guaranteed single deployment -- that would solve your problem.

           

          The nodes with loadfactor = 0 are standby nodes they will be used no other nodes are available

          I suspect there is something wrong with the information, we have seen previously that loadfactor =0 actually means that node is in error state and request won't be forwarded.

           

          if no loadfactor !=0 servers are left, all   loadfactor =0  servers will be equally load-balanced?

          That would be the case yes, new sessions would be load-balanced.

           

          If this cannot be achieved with mod_cluster what specific open source products - modules, proxy/balancers can be used to achieve this?)

          I would leave mod_cluster as is and focus more on having only single deployment if you say its not cluster ready.

           

          I wonder if this can be solved by domain making sure there is always a single deployment at least one in a cluster? Can you try?

           

          I need to think little more about this.

          Rado

          1 of 1 people found this helpful
          • 2. Re: mod_cluster clustering setup for AS7 for strict failover (no lb)
            marmotadev Newbie

            Radoslav Husar thanks for your answer. Can you elaborate more on this "I wonder if this can be solved by domain making sure there is always a single deployment at least one in a cluster?"?

            • 3. Re: mod_cluster clustering setup for AS7 for strict failover (no lb)
              Radoslav Husar Master

              Radoslav Husar thanks for your answer. Can you elaborate more on this "I wonder if this can be solved by domain making sure there is always a single deployment at least one in a cluster?"?

              I will have a look.

               

              Actually a great and fun way to implement this (from Paul) would be to:

               

              1. Write a custom mod_cluster metric
              2. that will leverage the HA Singleton service to
              3. return load of 1 (or 100) for the node where the service is deployed
              4. and return load of 0 (disabled) for when the node is not the master.
              5. The application would have to be deployed on all nodes, but it will be always accessed only on 1 node.

               

              Want to give it a try implementing?

               

              Rado