10 Replies Latest reply on Oct 10, 2013 7:23 AM by rhusar

    mod_cluster apache and 2 jboss_managers

    gioppoluca

      I've this configuration:

      1 Apache (on VM0)

      Jboss_Master1 (domain master and server node on VM1) + Jboss_slave1 (just server node on VM2) each with server_group1 and server_group2 defined (each with just 1 node)

      Jboss_Master2 (domain master and server node on VM3) + Jboss_slave2 (just server node on VM4) each with server_group3 defined

       

      so in total I've got 3 couples of servers that has to be balanced between the two of them.

       

      All nodes are different virtual machines.

      I tryed to create two virtual hosts in Apache, but it came out that "mod_advertise: directive in more than one VirtualHost: not supported".

      So I'm trying to figure out how to be sure that I end up having each server_group is balanced between its own nodes?

       

      Can I define in apache

       

      Listen 10.1.1.84:10001

      <VirtualHost 10.1.1.84:10001>

       

        ## Vhost Location

        <Location />

          Order allow,deny

           Allow from all

        </Location>

       

        # This directive allows you to view mod_cluster status at URL nvh_addr_port/mod_cluster-manager

        <Location /mod_cluster-manager>

         SetHandler mod_cluster-manager

         Order deny,allow

         Allow from 10.1.1.0/24

         AllowDisplay on

        </Location>

       

        KeepAliveTimeout 60

        MaxKeepAliveRequests 0

        EnableMCPMReceive

       

        ManagerBalancerName vdbcluster

        AdvertiseFrequency 5

        ServerAdvertise On

      </VirtualHost>

       

      And set on both the domains this?

      [domain@10.1.1.43:9999 /] /profile=ha/subsystem=modcluster/mod-cluster-config=configuration:read-resource

      {

          "outcome" => "success",

          "result" => {

              "advertise" => true,

              "advertise-socket" => "modcluster",

              "auto-enable-contexts" => true,

              "balancer" => "vdbcluster",

              "dynamic-load-provider" => {"load-metric" => [{"type" => "busyness"}]},

              "excluded-contexts" => "ROOT,invoker,jbossws,juddi,console",

              "flush-packets" => false,

              "flush-wait" => -1,

              "max-attempts" => 1,

              "node-timeout" => -1,

              "ping" => 10,

              "proxy-list" => "apache.internal:10001",

              "proxy-url" => "/",

              "smax" => -1,

              "socket-timeout" => 20,

              "ssl" => undefined,

              "sticky-session" => true,

              "sticky-session-force" => false,

              "sticky-session-remove" => false,

              "stop-context-timeout" => 10,

              "ttl" => -1,

              "worker-timeout" => -1

          }

      }

       

      Will mod-cluster be smart enough to understand that there will be 6 nodes presenting but that he has to balance them in couples? The right couples?

      Thanks

        • 1. Re: mod_cluster apache and 2 jboss_managers
          jfclere

          you need to pair the nodes in load-balancing groups. (See http://docs.jboss.org/mod_cluster/1.2.0/html/java.AS7config.html)

          • 2. Re: mod_cluster apache and 2 jboss_managers
            gioppoluca

            But does this mean that I need to have different profiles for the 3 server groups?

             

            I do not understand well the balancer vs load-balancing-groups approach

            Also it seems that the balancer (on AS) and ManagerBalancerName (on httpd) can be named differently and that ManagerBalancerName could even not be present provided that AS set his own name.

            This way should be possible to have a virtual host on apache that proxy to the two different balancers (one for each domains at least).

            so setting mucluster1 on Jboss_master1 and mycluster2 on Jboss-master2 I should be able to have two virtualhost on http with this reaspetcive definitions

             

            VH1

            ProxyPass / balancer://mycluster1/

             

            VH2

            ProxyPass / balancer://mycluster2/

             

            Is this correct or I'm missing something.

            I admit I'm new of the clustering stuff so...

            • 3. Re: mod_cluster apache and 2 jboss_managers
              jfclere

              I don't understand what you want to do... Which nodes are clustered? How do you want to separate the webapps? What are the Alias on AS servers?

              • 4. Re: mod_cluster apache and 2 jboss_managers
                gioppoluca

                Sorry the topology is a bit complex and the description not so well done.

                The figure below summarize the topology

                opendai bb schema.jpg

                5 virtual machines.

                There are 2 Domain controllers dedicated to 2 different business one host TEIID and GEOSERVER, the other custom applications.

                There are 3 server-groups and the need is that mod cluster balance things just between the correct nodes (calls to TEIID go to TEIID, etc.)

                I do not understand wheather use the "balancer" or the "domain" property in the mod-cluster configuration in JBoss (or both) and if use the ManagerBalancerName in the apache virtual host configuration for mod_cluster and also the value to assign to the various properties.

                Let's say that it should be nice to have teiid respond to "teiid.domain.org", geoserver to "geoserver.domain.org" and the custo application to "app.domain.org" (so 3 virtual hosts).

                JBoss 7.1.1, mod_cluster 1.2

                • 5. Re: mod_cluster apache and 2 jboss_managers
                  jfclere

                  Ok the most easy it to have a balancer for each server-group and use UseAlias (http://docs.jboss.org/mod_cluster/1.2.0/html/native.config.html#d0e505) in httpd.conf and have the Aliases correctly defined in each server.

                  • 6. Re: mod_cluster apache and 2 jboss_managers
                    gioppoluca

                    But on the JBoss mod_cluster subsystem do I use the "balancer" or the "domain" property?

                    I've already set a different multicast IP for each server-group so that they do not cross-talk, and setting the domain creates in the mod-cluster apparently the groups, so I think that this is the correct property.

                     

                    Also do I have to set the <Alias> in the host or on the virtual-server in the web subsystem?

                     

                    Should I want to use the same name but just different ports?

                     

                    right now if I go to 10.1.1.84:10001/odata (TEIID) or 10.1.1.84:10001/geoserver I access the application correctly

                    • 7. Re: mod_cluster apache and 2 jboss_managers
                      jfclere

                      1) use balancer, load-balancing group is to group node that have buddy replication.

                      2) Alias is in the virtual-server.

                      3) the alias name matters for the routing in httpd not the IP the node is using.

                      • 8. Re: mod_cluster apache and 2 jboss_managers
                        rhusar

                        1) use balancer, load-balancing group is to group node that have buddy replication.

                        Let me add that there is no longer buddy replication since AS6 and further. The load-balancing-group attribute (previously configured as domain) could be used for failover preference, or e.g. if there are 2 separate clusters replicating sessions for the same web app.

                        • 9. Re: mod_cluster apache and 2 jboss_managers
                          gioppoluca

                          Sorry, but now I'm more confused.

                          Can you explain better the difference between "balancer" and "domain" (so is called in AS7.1.1) and which one has to be used to separate server groups?

                          Thanks

                          • 10. Re: mod_cluster apache and 2 jboss_managers
                            rhusar

                            So there are 3 different applications, each deployed on 2 servers on an unique path? Use balancer. The domain (load-balancing-group) would be useful if it were the same /app but forming different clusters.