0
votes

I have deployed cluster of two Ignite 2.5.0 servers on two hosts (OpenStack cloud). They see each other using ipFinder TcpDiscoveryMulticastIpFinder (Topology snapshot [ver=14, servers=2, clients=0, CPUs=2, ...). Only one host has a public IP (floating IP), let's call it A, the other has only private IP, B, accessible from host A only. In my client (Eclipse IDE), in the config, I have set the public IP of A to connect to with TcpDiscoveryVmIpFinder.addresses. (In the config of A, public and private IPs in addressResolver and localAddress are correctly set).

When sending a broadcast() to this cluster, nothing happens for minutes. Killing B, broadcast works (on A).

How can I access "private" compute nodes of the cluster from a client outside? I saw signs of a "router" (bin/igniterouter.sh, config/router/default-router.xml) - maybe deprecated?, but not much info on how to use it, or any other way to solve this problem.

2

2 Answers

0
votes

Ignite client node is a regular node, but without storage(well, it can, for example if it has near cache or local cache). So like a server node it must be able to communicate with all nodes in the cluster. So you need to make the whole cluster to be accessible to your client or use thin client:

https://apacheignite.readme.io/docs/java-thin-client

Unfortunately, it doesn't support compute API yet, only cache operations and SQL can be used.

0
votes

Not the solution but a workaround with a proxy could be to install "haproxy" on public host A with lines:

listen l47501
    bind :47501
    mode tcp
    server worker1 192.168.0.224:47500
listen l47101
    bind :47101
    mode tcp
    server worker1 192.168.0.224:47100

in /etc/haproxy/haproxy.cfg, where 192.168.0.224 is B's private IP (named worker1). It connects A's ports' 47501 and 47101 to B's 47500 and 47100.

In B's ignite config (config/default-config.xml) set addressResolver for both discoverySpi (47500, see below) and communicationSpi (47100, not shown):

<property name="discoverySpi">
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="localAddress" value="192.168.0.224"/>
        <property name="addressResolver">
            <bean class="org.apache.ignite.configuration.BasicAddressResolver">
                <constructor-arg><map>
                    <entry key="192.168.0.224:47500" value="193.x.x.x:47501"/>

where 193.x.x.x is the public IP of A. (You have to open firewall for ingress tcp ports 47501 and 47101 on A.)

Broadcast "helloworld" worked on A and B from my IDE.