11 Replies Latest reply: Aug 7, 2012 10:40 AM by carlos hilner f costa RSS

    mod cluster, apache integration in jboss-as 7

    Willem Noorduin Newbie

      In the past I have written https://community.jboss.org/thread/162859, a tutorial for linking two different clusters with two different applications with two different virtual host. As the future goes on, I want the same, but now with JBoss-AS7. I understand that you can use the shared objects from the latest mod-cluster in httpd to connect to a cluster, but there is a problem, normally, I would define avirtual host like:


      <VirtualHost *:80>
          ServerAdmin unix@tntpost.nl
          DocumentRoot /apps/www.application1.nl/data
          ServerName www.application1.nl:80
          ErrorLog logs/www.application1.nl-error_log
          CustomLog logs/www.application1.nl-access_log combined
          LogLevel debug

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



      But there doesnt't seem to be a way to specify the clustername (here cluster1) in the mod-cluster subsystem (see http://docs.jboss.org/mod_cluster/1.1.0/html/java.AS7config.html for the properties you can use in the subsystem). Back in the olden days there were properties like:


      <!-- Configure this node's communication with the load balancer -->
        <bean name="HAModClusterConfig" class="org.jboss.modcluster.config.ha.HAModClusterConfig" mode="On Demand">

          <!-- Comma separated list of address:port listing the httpd servers
               where mod_cluster is running. -->
          <property name="proxyList">${jboss.modcluster.proxyList:localhost:80}</property>
          <property name="domain">${jboss.Domain:DefaultDomain}</property>
                  <!-- Configuration values for the load balancer itself (must be the
               same on all nodes in the cluster). These will be passed to the
               load balancer. -->

          <property name="stickySession">true</property>
          <property name="stickySessionForce">true</property>
          <property name="stickySessionRemove">false</property>
          <property name="maxAttempts">1</property>
          <property name="workerTimeout">-1</property>
          <property name="balancer">${jboss.modcluster.balancer}</property>


      which you had to put in the bean configuration of mod-cluster.sar.


      • Does someone no if I can still use the balancer name (and the other properties) somehow in AS 7 ? What are the translations from JBoss 5/6 to AS7 in this respec.
      • And if not, how is cluster seperation achieved here (or do you just have to configure the same jvmRoute for cluster nodes belonging to the same cluster, if so, how does the ProxyPass command in the virtual host change) ?