I am running a Ignite cluster on boxes with multiple network interfaces configured. I have 3 different network interfaces with different speeds.
i see Ignite finds 3 ip addresses
INFO: Non-loopback local IPs: xxx, yyy, zzz
then
INFO: Successfully bound to TCP port [port=47100,locHost=0.0.0.0/0.0.0.0]
and
INFO: Successfully bound to TCP port [port=47500, localHost=0.0.0.0/0.0.0.0]
and
>>> Local node addresses: [Server1/xxx, Server1/yyy, Server1/zzz, /127.0.0.1]
>>> Local ports: TCP:47100 TCP:47500 TCP:48100
I want to configure Ignite cluster to use only 1 of these network interfaces for its communications.
I have this Ignite xml network configuration
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" parent="base-ignite.cfg">
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>box1:47500</value>
<value>box2:47500</value>
<value>box3:47500</value>
<value>box4:47500</value>
....
...
..
.
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
when a node joins I find
INFO: Added new node to topology: TcpDiscoveryNode [id=cb61c90f-6a8d-4c4a-81dc-7994b5e5fd80, addrs=[box1-xxx,box1-yyy, box1-yyy, 127.0.0.1], sockAddrs=[/box1-xxx:47500, /box1-xxx:47500, /box1-yyy:47500, /box1-yyy:47500, /box1-zzz:47500, /box1-zzz:47500, /127.0.0.1:47500], discPort=47500, order=2, intOrder=2, lastExchangeTime=1442308257191, loc=false, ver=1.5.0#20150911-sha1:b736c46f, isClient=false]
so the Ignite server bind and listens to all network interfaces on the box. and in the xml config i give only 1 address of network interface, but some how when in the node joining message, i see the ip address of all other network interfaces.
Ignite requires two ports to be available on each node: one for discovery (47500 by default) and another for communication (47100 by default). See this link for more detailed explanation: https://mail-archives.apache.org/mod_mbox/incubator-ignite-dev/201504.mbox/%3CCABuYRcqGRB2_3Y7niHShz=icHVVr5d8PVmdwug=oOwHVSXA4SA@mail.gmail.com%3E
Port 48100 is used by shared memory communication which works faster than traditional TCP communication, but only for nodes that are running on the same physical machine. This feature is optional and can be disabled by setting -1 as a shared memory communication port:
<property name="communicationSpi">
<bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
<property name="sharedMemoryPort" value="-1"/>
</bean>
</property>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With