4 Replies Latest reply on Aug 14, 2014 11:16 AM by lokesh tarley

    Can JBoss cluster's will configured with a different mod_cluster balancer name

    lokesh tarley Newbie

      Hi,

       

      We are using mod_cluster 1.2.6.Final version and Wildfly-8.1.0.Final(with domain mode configuraton)

       

      WildFly configuration:-

      Here we have configured two server_groups :-

      1) server_group_one

      2) server_group_two

      and each server group we having 6 node .

       

      Mod_cluster_configuration:-

      Listen <IP>:<port>

      <VirtualHost <IP>:<port>

        <Directory />

        Order deny,allow

        Allow from all

        </Directory>

       

        ManagerBalancerName server_group_one_cluster

        ManagerBalancerName server_gropup_two_cluster

        EnableMCPMReceive

      </VirtualHost>

       

      ProxyPass / balancer://server_group_one_cluster/

      ProxyPass / balancer://server_group_two_cluster/

       

       

      what we are trying to do is making these two server_groups as a individual JBoss_cluster_partition, so, in that way we will having two JBoss_cluster_partions and having 6 nodes each, such that we can achieve rolling deployment process.

       

      Problem we are facing at mod_cluster end :-

      we are using two ManagerBalancerName as mentioned above the request only proceed towards the member of "server_group_one" only. and we need to loadbalancing the incoming requests across the mentioned Balancer names.

       

      kindly suggest ! thank you .

        • 1. Re: Can JBoss cluster's will configured with a different mod_cluster balancer name
          Michal Karm Babacek Apprentice

          Dear Lokesh, your configuration is wrong.

           

          There are two distinct things, one of which is what you actually need, IMHO.

           

          Having multiple balancers - fine ProxyPass tuning

          One can have different balancers configured, but it's not done with ManagerBalancerName.

          One has to set, e.g. balancer="server_group_one_balancer" as an attribute of the modcluster subsystem configuration in the WildFly server itself.

          The result is having multiple balancers in the mod_cluster on the Apache HTTP Server side. Then you can, for instance, fine-tune these with ProxyPass settings.

           

          Since your goal is to be able to do rolling updates, the aforementioned configuration is actually not what you want.

           

          Having multiple load balancing groups

          The configuration for your use case is called "load balancing groups".

          Set load-balancing-group="server_group_one_cluster" for the first group of your servers and load-balancing-group="server_group_two_cluster" for the second group of servers.

          Then, on the mod_cluster_manager console

          <Location /mod_cluster_manager>

             SetHandler mod_cluster-manager

             Order deny,allow

             Deny from all

             # Lat's change it prior going to production :-)

             Allow from all

          </Location>

          one can see there are two load balancing groups. The load balancing is done within these groups, so you can easily Disable one of them, let the sessions drain, perform an update, enable it again...

          I'm sure this load balancing group configuration is exactly what you need.

           

          HTH

           

          K.

          • 2. Re: Can JBoss cluster's will configured with a different mod_cluster balancer name
            lokesh tarley Newbie

            Thank a lot Michal for your quick turn around.

             

            WildFly configuration :-

              <server-group name="server-group-one" profile="ha">

                        .......

                        .........

                        <system-properties>

                            <property name="jboss.cluster.group.name" value="server-group-one-cluster" boot-time="false"/>

                            <property name="jboss.ha.modcluster.balancer" value="server-group-one-cluster" boot-time="false"/>

                            <property name="jboss.ha.modcluster.lbgroup" value="server-group-one" boot-time="false"/>

                                   </system-properties>

                    </server-group>

                </server-groups>

             

            for server-group-two:-

             

            <server-group name="server-group-two" profile="ha">

                        .......

                        .........

                        <system-properties>

                            <property name="jboss.cluster.group.name" value="server-group-two-cluster" boot-time="false"/>

                            <property name="jboss.ha.modcluster.balancer" value="server-group-two-cluster" boot-time="false"/>

                            <property name="jboss.ha.modcluster.lbgroup" value="server-group-two" boot-time="false"/>

                                   </system-properties>

                    </server-group>

                </server-groups>

             

            mod_cluster configuration:-

             

            ProxyPreserveHost On

            #ManagerBalancerName <BalancerName>  ---->  this time i comment it, what could be its value if i want to define it ?

             

            ProxyPass /myapp/* balancer://server-group-one-cluster/myapp/* stickysession=JSESSIONID|jsessionid

            ProxyPass /myapp/* balancer://server-group-two-cluster/myapp/* stickysession=JSESSIONID|jsessionid

             

             

            <Directory />

            Order deny,allow

            Allow from all

            Deny from <IP>

            </Directory>

             

            <Location /mod_cluster_manager>

            SetHandler mod_cluster-manager

            Order deny,allow

            Allow from all

            Deny from <IP>

            </Location>

             

            1) when i set the same value of "jboss.ha.modcluster.lbgroup" then the request will serves on both the consumer groups but in case of different values it incoming requests will serves only by the member of  server_group_one.

             

            please suggest

            • 3. Re: Re: Can JBoss cluster's will configured with a different mod_cluster balancer name
              Michal Karm Babacek Apprentice

              Please, completely remove any

              name="jboss.ha.modcluster.balancer" ...  settings and also remove the Proxy* settings. It's superfluous here and it affects the setup in a way that's not desirable for you.

               

              An example Apache HTTP Server configuration for you:

               

              LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
              LoadModule slotmem_module modules/mod_slotmem.so
              LoadModule manager_module modules/mod_manager.so
              LoadModule advertise_module modules/mod_advertise.so
              
              Listen 192.168.122.74:2181
              
              MemManagerFile "/tmp/jboss/httpd/cache/mod_cluster"
              
              ServerName 192.168.122.74:2181
              
              <IfModule manager_module>
                Listen 192.168.122.74:8847
                
                <VirtualHost 192.168.122.74:8847>
                    ServerName 192.168.122.74:8847
                    <Directory />
                        Order deny,allow
                        Deny from all
                        # Changeit! 
                        Allow from all
                    </Directory>
              
                AdvertiseGroup 224.0.1.111:23365
                EnableMCPMReceive
              
                <Location /mcm>
                    SetHandler mod_cluster-manager
                    Order deny,allow
                    Deny from all
                    Allow from all
                </Location>
              
                </VirtualHost>
              </IfModule>
              

               

              Furthermore, an example configuration for worker nodes:

               

              <subsystem xmlns="urn:jboss:domain:modcluster:1.2">
                  <mod-cluster-config advertise-socket="modcluster" connector="ajp" load-balancing-group="server-group-one" >
                      <dynamic-load-provider>
                          <load-metric type="busyness"/>
                      </dynamic-load-provider>
                  </mod-cluster-config>
              </subsystem>
              

               

              i.e. for your use case, I sincerely believe you don't need to tweak the Poxy settings. Make sure you have load-balancing-group properties set and verify it on the mod_cluster-manager console (url /mcm on Apache in my example).

               

              HTH

              K.

              • 4. Re: Can JBoss cluster's will configured with a different mod_cluster balancer name
                lokesh tarley Newbie

                from domain.xml file

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

                                <mod-cluster-config advertise-socket="modcluster" proxy-list="${jboss.ha.modcluster.proxy-list}" balancer="${jboss.ha.modcluster.balancer}" advertise="false" load-balancing-group="${jboss.ha.modcluster.lbgroup}" connector="ajp">

                 

                 

                As we are using WildFly-8.1(domain mode) and we configured four server groups this is the reason that we having these properties "jboss.ha.modcluster.lbgroup,jboss.ha.modcluster.balancer,jboss.cluster.group.name" and on the same master(domain.xml) we configured these four server groups

                 

                The reason that i mentioned only two server-groups(server-group-one and server-group-two) because on the other two server-groups(server-group-three and server-group-four) we deploying different applications(war files) and they having different web-tier servers

                 

                so, if i configure with "server-group-one" :- mod-cluster-config advertise-socket="modcluster" connector="ajp" load-balancing-group="server-group-one" > it may occurs some conflicts ?