intra-mart Accel Platform安装指南 第33版2020-09-01

5.3.2.1. 网络

设置intra-mart Accel Platform的网络配置。

  1. 双击“ ProjectNavigator”中的<conf / network-agent-config.xml>文件将其打开,然后选择“ Source”选项卡。

  2. 在<network-agent-config> / <TCP> / <initial-hosts> / <host>中指定Resin的IP地址。

    如果是分布式配置,请添加与目标树脂一样多的数量。

  3. 在<network-agent-config> / <id>中指定集群ID。

    在构建多租户环境时,有必要为每个租户指定此集群ID。
    对于分布式配置,请指定相同的集群ID。
  4. 在<network-agent-config> / <bind-port>中执行集群时,指定用于通信的端口号。

    在构建多租户环境时,必须划分端口号,以免端口号冲突。
  5. 在<network-agent-config> / <port-range>中指定端口范围。

    当已使用<network-agent-config> / <bind-port>指定的端口号时,将使用此端口范围
    仅在设置值范围内搜索和使用备用端口号。
  6. 在<network-agent-config> / <max-threads>和<network-agent-config> / <max-oob-threads>中,指定用于服务器到服务器通信的最大Thread数。

    如果组成分布式环境的服务器数量很多,则如果用于服务器之间通信的Thread数量不足,则可能无法进行群集。
    使用“服务器数* 2”作为指南来设置<max-threads>和<max-oob-threads>的值。
    <id>prototype</id> 
    <bind-port>5200</bind-port> 
    <port-range>2</port-range> 
    <preferIPv4Stack>true</preferIPv4Stack>
    <!--
    <max-threads>10</max-threads> 
    <max-oob-threads>10</max-oob-threads>
     --> 
    
    <TCP>
     <initial-hosts>
       <host address="127.248.100.1"/>
       <host address="127.248.100.2"/>
       <host address="127.248.100.3"/>
     </initial-hosts> 
    </TCP>

注解

  • <conf / network-agent-config.xml>您还可以在文件的地址规范中设置主机名。
  • 如果与主机名关联的IP地址更改,请重新启动Resin服务器。
<TCP>
 <initial-hosts>
   <host address =“app0-host”/>
   <host address =“app1-host”/>
   <host address =“app2-host”/>
 </initial-hosts> 
</TCP>

注解

  • 可以在<conf / network-agent-config.xml>文件中将UDP指定为通信协议。
    在多播可用的环境中,可以使用UDP高速执行服务器之间的通信。
  • 若要指定UDP,请删除<TCP>设置并进行如下设置。
<UDP> 
 <mcast-address>228.10.10.10</mcast-address> 
 <mcast-port>45588</mcast-port> 
 <initial-members>3</initial-members> 
</UDP>