简体   繁体   中英

Jboss Eap - mod_cluster - to prevent jboss talking to each Other

I have a jboss setup with 2 jboss instances on one VM. Each of the 2 jboss talk to 2 apaches on same VM.


Apache 1 apache listen port is 82

<VirtualHost 192.168.1.2:6262>

    <Directory />
        Order deny,allow
        Allow from all
    </Directory>

  KeepAliveTimeout 60
  MaxKeepAliveRequests 0

  ManagerBalancerName box1_cluster
  ServerAdvertise Off
# AdvertiseFrequency 5
  EnableMCPMReceive On

  <Location /mod_cluster-manager>
    SetHandler mod_cluster-manager
    Order deny,allow
    Allow from all
  </Location>
</VirtualHost>

jboss 1

        <subsystem xmlns="urn:jboss:domain:modcluster:1.1">
          <mod-cluster-config advertise-socket="modcluster" connector="ajp" proxy-list="192.168.1.2:6262" balancer="box1_cluster">
            <dynamic-load-provider>
              <load-metric type="busyness"/>
            </dynamic-load-provider>
          </mod-cluster-config>
        </subsystem>

  <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">


        <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

Apache 2,listen port is 83

<VirtualHost 192.168.1.2:6263>

    <Directory />
        Order deny,allow
        Allow from all
    </Directory>

  KeepAliveTimeout 60
  MaxKeepAliveRequests 0

  ManagerBalancerName box2_cluster
  ServerAdvertise Off
# AdvertiseFrequency 5
  EnableMCPMReceive On

  <Location /mod_cluster-manager>
    SetHandler mod_cluster-manager
    Order deny,allow
    Allow from all
  </Location>

</VirtualHost>

jboss 2

     <subsystem xmlns="urn:jboss:domain:modcluster:1.1">
          <mod-cluster-config advertise-socket="modcluster" connector="ajp" proxy-list="192.168.1.2:6263" balancer="box2_cluster">
            <dynamic-load-provider>
              <load-metric type="busyness"/>
            </dynamic-load-provider>
          </mod-cluster-config>
        </subsystem>

  <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

        <socket-binding name="txn-status-manager" port="4713"/>
        <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

The apache works well and connect to jboss .The apache also detects all deployed apps.


Questions:-

When the

192.168.1.2:6262/mod_cluster-manager is done it shows the applications deployed on the 2nd jboss. I want to make sure that the apache 1 detects application that are deployed in jboss 1 and no other applications. Basically i want to use mod_cluster but dont want one jboss to talk to another.I want to use mod_cluster for jboss to autopublish applications to apache.But i dont want 2 jboss to talk to each other.

If you do not want two JBoss instances cross talk (since they are not in the same cluster) then you should have the 2 nodes listen on unique multicast addresses.

By the way, if you do not use clustering you are losing the ability of session replication and high availability.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM