You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Kevin Daly <ke...@meta.com> on 2015/12/03 19:49:08 UTC

Setting Up Ignite Grids on the Same Netmask

I am trying to set up our Ignite Grids so that they don't see each other..
For example if I have 2 grids of different names, they see each other.. And
this is causing a problem because the have different classes loaded.

This is in a development environment where there are different developers
running 3 node clusters on their local machines.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Setting-Up-Ignite-Grids-on-the-Same-Netmask-tp2133.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Setting Up Ignite Grids on the Same Netmask

Posted by vkulichenko <va...@gmail.com>.
Hi Kevin,

Grid name is actually just a local name of your Ignite instance, it can be
used to get this instance via Ignition.ignite(..) method. It's useful when
you have several nodes in one JVM (such deployment is usually used only in
testing environment).

To create two isolated clusters, you have to properly configure discovery IP
finder. E.g., in case of multicast you can provide different multicast
groups. Nodes with different groups will never discover each other:

<property name="discoverySpi">
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="ipFinder">
            <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                <property name="multicastGroup" value="228.1.2.4"/>
            </bean>
        </property>
    </bean>
</property>

If you're using VM IP finder with explicit list of IPs, you can provide
different range of ports. E.g., for the first cluster:

<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>127.0.0.1:47500..47509</value>
                    </list>
                </property>
            </bean>
        </property>
    </bean>
</property>

And for the second one:

<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>127.0.0.1:47600..47609</value>
                    </list>
                </property>
            </bean>
        </property>
    </bean>
</property>

Hope this helps.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Setting-Up-Ignite-Grids-on-the-Same-Netmask-tp2133p2135.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.