6 Replies Latest reply on Dec 9, 2014 1:10 AM by Abhishek Sharma

    Resources to configure active/active failover for my cluster

    John Doe Newbie

      Hello,

       

      I have two nodes in a cluster using JGroups with Infinispan. I simply modified my customized standalone.xml to use the same features as the standalone-ha.xml file provided. I'm working with JBoss 7.1.2 on the nodes.

       

      I'm interested in configuring the nodes to run in an active/active system, wherein the nodes each receive I/O requests and serve clients, and where the session is replicated to node B when node A goes down, and vice versa. Can somebody please point me in the right direction with regards to what I'll need to do to achieve this? Also curious how this relates to the mod_cluster, mod_proxy, and other similar components I've read a little bit about.

       

      Any information would be very helpful. I'm interested in hearing all inputs as I'm exploring JBoss for the first time and am not fully comfortable with all the configuration options, etc.

       

      Thank you for your time.

        • 1. Re: Resources to configure active/active failover for my cluster
          Radoslav Husar Master

          I'm interested in configuring the nodes to run in an active/active system, wherein the nodes each receive I/O requests and serve clients, and where the session is replicated to node B when node A goes down, and vice versa. Can somebody please point me in the right direction with regards to what I'll need to do to achieve this?

          That's what the HA profile does (./bin/standalone.sh -c standalone-ha.xml; You might want to start with the default HA profile and tweak it/test it before you start putting pieces back to your profile). The session data is replicated as its created or changed.

           

          Take a look at: https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto

           

          Also curious how this relates to the mod_cluster, mod_proxy, and other similar components I've read a little bit about.

          They take care of load balancing and handle failover when a JBoss node fails or is shut down. Take a look at mod_cluster - JBoss Community

          1 of 1 people found this helpful
          • 2. Re: Resources to configure active/active failover for my cluster
            John Doe Newbie

            Hi Radoslav,

             

            First, thank you for the response. I just have a small clarifying question.

             

            To confirm, using the standalone-ha.xml file to start up JBoss already creates an active/active node configuration, wherein all nodes are "awake" at all times and handling client requests? I"m currently reading your link so forgive me if the answer is in there, but is this somewhere configured in the addition of the JGroup subsystem or in the change of the Infinispan subsystem caching, or both?

             

            Also, I'm not sure I understand the need for mod_cluster if the above statements are true. Meaning, if the nodes are by default configured in this active/active setup, then when would mod_cluster come into effect? Is it only responsible for replicating the session to another node when one goes down mid session?

             

            Thank you sincerely for your help.

             

            EDIT: The link supplied discussed domain mode while I am trying to do this in standalone mode.

            • 3. Re: Resources to configure active/active failover for my cluster
              Wolf-Dieter Fink Master

              This is related to the invocation.

              If you use http and a loadbalacnce in front of your JBoss you need to have mod_* to route the invocation to one of the instances. If you have stickyness the LB will pass the client to the same server all the time.

               

              If you use EJB invocation the ejb-client do the work and you do not need to have a loadbalancer and a mod_* for this.

               

              Hope this is what you are looking for, otherwise you might explain your question a bit more.

              • 4. Re: Resources to configure active/active failover for my cluster
                Radoslav Husar Master
                To confirm, using the standalone-ha.xml file to start up JBoss already creates an active/active node configuration, wherein all nodes are "awake" at all times and handling client requests?

                Yes. They are going to replicate state, so in case one cluster node fails, at least another one can take over.

                 

                I"m currently reading your link so forgive me if the answer is in there, but is this somewhere configured in the addition of the JGroup subsystem or in the change of the Infinispan subsystem caching, or both?

                See the differences between standalone.xml and standalone-ha.xml -- that should provide an answer. There is a extension and subsystem configuration.

                 

                Also, I'm not sure I understand the need for mod_cluster if the above statements are true. Meaning, if the nodes are by default configured in this active/active setup, then when would mod_cluster come into effect? Is it only responsible for replicating the session to another node when one goes down mid session?

                Mod_cluster is the load balancer, the reverse proxy. And this is why the name of the project is not very clear. As the binaries hint, mod_proxy_cluster, is the replacement for mod_proxy_balancer (which both make use of mod_proxy_http/ajp for forward request to the cluster nodes). It helps to make better loadbalancing decisions, help with configuration, handle failover better, etc. See mod_cluster - JBoss Community for more.

                 

                All the session replication logic is in AS. So clustering =/= domain =/= mod_cluster. Different concepts.

                 

                You don't need mod_cluster if you have a hardware or other loadbalancer.

                 

                EDIT: The link supplied discussed domain mode while I am trying to do this in standalone mode.

                Well yes, but this is all configuration-wise only. The clustering concepts remain the same.

                • 5. Re: Resources to configure active/active failover for my cluster
                  John Doe Newbie

                  Thank you this is very clear.

                   

                  I appreciate the help sincerely.

                  • 6. Re: Resources to configure active/active failover for my cluster
                    Abhishek Sharma Newbie

                    Radoslav, I have walked through the whole conversation and understood that

                     

                    1) I have to achieve clustering in both the JBoss instances

                    2) Follow the document to do configuration changes in domain.xml

                    3) Do the required configuration changes in apache

                     

                    Because what I am referring to is exactly the discussion what I have gone through. So it is my sincere request to walk me through this till I achieve the fail-over on both Instances.

                     

                    Also I understand that though I run my application in standalone mode I have to do some changes in domain.xml. Please correct me I am wrong