Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

TCP/IP Discovery

Configuring TCP/IP-based node discovery in GridGain, including static, multicast, JDBC, shared file system, and ZooKeeper IP finders.

In a GridGain cluster, nodes can discover each other by using DiscoverySpi. GridGain provides TcpDiscoverySpi as a default implementation of DiscoverySpi that uses TCP/IP for node discovery. Discovery SPI can be configured for Multicast and Static IP based node discovery.

Static IP Finder

Static IP Finder, implemented in TcpDiscoveryVmIpFinder, is the default finder option. It allows you to specify a set of IP addresses and ports that will be checked for node discovery.

You are only required to provide at least one IP address of a remote node, but usually it is advisable to provide 2 or 3 addresses of nodes that you plan to start in the future. Once a connection to any of the provided IP addresses is established, GridGain automatically discovers all other nodes.

Instead of specifying addresses in the configuration, you can specify them in the IGNITE_TCP_DISCOVERY_ADDRESSES environment variable or in the system property with the same name. Addresses should be comma separated and may optionally contain a port range.

By default, the TcpDiscoveryVmIpFinder is used in the 'non-shared' mode. If you plan to start a server node, then in this mode the list of IP addresses should contain the address of the local node as well. In this case, the node will not wait until other nodes join the cluster; instead, it will become the first cluster node and start to operate normally.

You can configure the static IP finder via XML configuration or programmatically:

<bean class="org.apache.ignite.configuration.IgniteConfiguration">
    <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>
                            <!--
                              Explicitly specifying address of a local node to let it start and
                              operate normally even if there is no more nodes in the cluster.
                              You can also optionally specify an individual port or port range.
                              -->
                            <value>1.2.3.4</value>
                            <!--
                              IP Address and optional port range of a remote node.
                              You can also optionally specify an individual port.
                              -->
                            <value>1.2.3.5:47500..47509</value>
                        </list>
                    </property>
                </bean>
            </property>
        </bean>
    </property>
</bean>

Multicast IP Finder

TcpDiscoveryMulticastIpFinder uses Multicast to discover other nodes. Here is an example of how to configure this finder via a Spring XML file or programmatically:

unsupported

Multicast and Static IP Finder

You can use both Multicast and Static IP based discovery together. In this case, in addition to any addresses received via multicast, TcpDiscoveryMulticastIpFinder can also work with a pre-configured list of static IP addresses, just like Static IP-Based Discovery described above. Here is an example of how to configure Multicast IP finder with static IP addresses:

unsupported

Isolated GridGain Clusters on Same Set of Machines

GridGain allows you to start two isolated clusters on the same set of machines. This can be done if nodes from different clusters use non-intersecting local port ranges for TcpDiscoverySpi and TcpCommunicationSpi.

Let’s say you need to start two isolated clusters on a single machine for testing purposes. For the nodes from the first cluster, you should use the following TcpDiscoverySpi and TcpCommunicationSpi configurations:

unsupported

For the nodes from the second cluster, the configuration might look like this:

unsupported

As you can see from the configurations, the difference between them is minor — only port numbers for SPIs and IP finder vary.

If you want the nodes from different clusters to be able to look for each other using the multicast protocol, replace TcpDiscoveryVmIpFinder with TcpDiscoveryMulticastIpFinder and set unique TcpDiscoveryMulticastIpFinder.multicastGroups in each configuration above.

JDBC-Based IP Finder

Not supported in .NET/C#/C++.

You can have your database be a common shared storage of initial IP addresses. With this IP finder, nodes will write their IP addresses to a database on startup. This is done via TcpDiscoveryJdbcIpFinder.

unsupported

unsupported

Shared File System IP Finder

Not supported in .NET/C#/C++.

A shared file system can be used as a storage for nodes' IP addresses. The nodes will write their IP addresses to the file system on startup. This behavior is supported by TcpDiscoverySharedFsIpFinder.

unsupported

unsupported

ZooKeeper IP Finder

Not supported in .NET/C#.

To set up ZooKeeper IP finder use TcpDiscoveryZookeeperIpFinder (note that ignite-zookeeper module has to be enabled).

unsupported

unsupported

This page is: Copyright © 2026 MariaDB. All rights reserved.

Last updated

Was this helpful?