1 Reply Latest reply on May 5, 2014 9:28 AM by rhusar

    Balancer (name) and LBGroup (name) in JBoss 7

    willemnoorduin

      When I implement a number of clusters  I end up with something like:

       

      Node app1-server (ajp://server:8109):

      Enable Contexts Disable Contexts

      Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 0

      Virtual Host 1:

      Contexts:

      /app1, Status: ENABLED Request: 0 Disable

      Aliases:

      default-host
      localhost
      example.com

      Node app2-server (ajp://server:8309):

      Enable Contexts Disable Contexts

      Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 0

       

      All is working perfectly, but I aspect the value of Balancer of LBGroup the name of the cluster (which I use in the Proxy statements):

       

      <Location /app1 >

         ProxyPass balancer://cluster1/app1 stickysession=JSESSIONID|jsessionid nofailover=On

         ProxyPassReverse balancer://cluster1/app1

      </Location>

       

      <Location /app2 >

         ProxyPass balancer://cluster2/app2 stickysession=JSESSIONID|jsessionid nofailover=On

         ProxyPassReverse balancer://cluster2/app2

      </Location>

       

      Now I know mycluster is a default. My question is: where in the standalona-ha.xml must I set the name of the cluster and the LBGroup name. I do not see it anywhere/

        • 1. Re: Balancer (name) and LBGroup (name) in JBoss 7
          rhusar

          Now I know mycluster is a default. My question is: where in the standalona-ha.xml must I set the name of the cluster and the LBGroup name. I do not see it anywhere/

          You can change the balancer name and load balancing group using XML or via CLI interface:

           

          In XML:

           

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

           

          Via CLI:

           

          [standalone@localhost:9999 /] /subsystem=modcluster/mod-cluster-config=configuration/:write-attribute(name=load-balancing-group, value=myLBGroup)
          {
              "outcome" => "success",
              "response-headers" => {
                  "operation-requires-reload" => true,
                  "process-state" => "reload-required"
              }
          }