简体   繁体   English

Jboss Eap-mod_cluster-防止jboss互相交谈

[英]Jboss Eap - mod_cluster - to prevent jboss talking to each Other

I have a jboss setup with 2 jboss instances on one VM. 我在一个VM上有2个jboss实例的jboss设置。 Each of the 2 jboss talk to 2 apaches on same VM. 2个jboss中的每一个都与同一VM上的2个apache通信。


Apache 1 apache listen port is 82 Apache 1 apache侦听端口为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 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 Apache 2,侦听端口为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 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. apache运行良好并连接到jboss。apache还可以检测所有已部署的应用程序。


Questions:- 问题: -

When the 当。。。的时候

192.168.1.2:6262/mod_cluster-manager is done it shows the applications deployed on the 2nd jboss. 192.168.1.2:6262/mod_cluster-manager完成,它显示了部署在第二个jboss上的应用程序。 I want to make sure that the apache 1 detects application that are deployed in jboss 1 and no other applications. 我想确保apache 1检测到jboss 1中部署的应用程序,而没有其他应用程序。 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. 基本上我想使用mod_cluster但不想让一个jboss与另一个人聊天。我想使用mod_cluster来让jboss自动将应用程序发布到apache。但是我不想让2个jboss互相交谈。

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. 如果您不希望两个JBoss实例发生串扰(因为它们不在同一集群中),则应该让2个节点侦听唯一的多播地址。

By the way, if you do not use clustering you are losing the ability of session replication and high availability. 顺便说一句,如果您不使用群集,则会丢失会话复制和高可用性的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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