5 Replies Latest reply on Jun 12, 2014 8:25 AM by jxavier

    Wildfly failover configuration with mod-cluster

    jxavier

      I’m currently running my JBoss cluster using S3Ping configuration in AWS under Elastic Load Balencer, and this configuration is active-active and my application is not working as expected with this configuration and its more suitable with active-passive configuration, So I followed this documentation --[https://docs.jboss.org/author/display/WFLY8/WildFly+8+Cluster+Howto|../../../../../../../../../../display/WFLY8/WildFly+8+Cluster+Howto] , It’s worked for me except mod-cluster configuration.

       

       

      As I mentioned above, running all the instances in AWS cloud, launch 3 instances

      1. Domain controller and Master

      2. Slave

      3 Mod-cluster

       

      Master-Slave configuration is working perfectly and mod-cluster configuration is not working for me.

       

      1. In mod-cluster configuration, how will detect my master/slave instances, because there is no such configs in VirtualHost file.

      2. Is this configuration will work in AWS infrastructure

       

      Please advise me to configure this. thanks in advance

       

      OS - Ubuntu, Version - wildfly8


      Regards,

      Jithin

        • 1. Re: Wildfly failover configuration with mod-cluster
          rhusar

          1. In mod-cluster configuration, how will detect my master/slave instances, because there is no such configs in VirtualHost file.

          There is no such concept for mod_cluster. Master/slave or rather Domain controller/Host controller is a WildFly management concept.

           

          You only have a httpd load-balancer that forwards request to the backend WildFly servers.


          2. Is this configuration will work in AWS infrastructure

          If you have already the load-balancer running, you are probably having issue with nodes finding each other. It uses UDP multicast by default, which does not work in AWS.

           

          You would need to configure this statically using proxy-list attribute in mod_cluster subysstem configuration and input comma separated list (host:port) of the load-balancers to connect to.

          1 of 1 people found this helpful
          • 2. Re: Wildfly failover configuration with mod-cluster
            jxavier

            Thanks Husar.

             

            I'll explain here my desired architecture here.

             

            I'm using Jboss in message queuing(ESB) flow, for HA, currently I'm using S3PING configuration with AWS Elastic Loadbalencer and this is working, but messages are flowing to both the nodes(instances) - active-active, both nodes are processing the request and making duplicates. So that I want to make Jboss configuration to active-passive, only one node should active and if that is failed other should come online.  Followed this documentation - https://docs.jboss.org/display/WFLY8/WildFly+8+Cluster+Howto and configured except mod-cluster. Is this configuration will work in AWS? Can you please suggest a me any recommnded configuration?

            • 3. Re: Wildfly failover configuration with mod-cluster
              ctomc

              Can you paste your apache's configuration? (host part, noting else)

              you probably just need to configure sticky session with load balance factor to prefer master node

              • 4. Re: Re: Wildfly failover configuration with mod-cluster
                rhusar

                Well if it's about the strict active/passive then that cannot be reliably provided by mod_cluster, but mod_jk supports this specific case using activation and redirect in case the node is down. Here is a configuration to achieve that:

                 

                  # The advanced router LB worker
                  worker.list=router
                  worker.router.type=lb
                  worker.router.balance_workers=worker1,worker2
                
                  # Define the first member worker
                  worker.worker1.type=ajp13
                  worker.worker1.host=myhost1
                  worker.worker1.port=8009
                  # Define preferred failover node for worker1
                  worker.worker1.redirect=worker2
                
                  # Define the second member worker
                  worker.worker2.type=ajp13
                  worker.worker2.host=myhost2
                  worker.worker2.port=8009
                  # Disable worker2 for all requests except failover
                  worker.worker2.activation=disabled
                
                • 5. Re: Re: Re: Wildfly failover configuration with mod-cluster
                  jxavier

                  Mod-cluster configuration working now  - I made couple of changes in Jboss and mod-cluster VirtualHost file.

                   

                  Jboss - Followed this  - https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/Configure_the_mod_cluster_Subsystem_to_Use_TCP.html

                  and configured proxy_list.

                   

                  Mod-cluster -  VirtualHost file -

                   

                    <VirtualHost 10.1.128.58:6666>

                  <Directory />

                      Order deny,allow

                      #Deny from all

                      Allow from all

                    </Directory>

                      KeepAliveTimeout 300

                      MaxKeepAliveRequests 0

                      EnableMCPMReceive

                      <Location /mod_cluster_manager>

                        SetHandler mod_cluster-manager

                        Order deny,allow

                        #Deny from all

                        Allow from all

                      </Location>

                    ManagerBalancerName other-server-group

                    </VirtualHost>

                  </IfModule>

                   

                  After this changes all looks good for me - deployed application is coming in - http://<mod-cluster-ip>:6666/cluster-demo/put.jsp .


                  I've some concern about this -

                  1. My expected configuration is active-passive (looks like its working), will it works as same?, if not, is there any way in mod-cluster to stick the session to one server until its getting an issue.

                  2. This configuration has one single point of failure, for some reason Domain controller down, cluster will not work. Is there any way to configure Domain controller in HA mode?