Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Local multiple instances of Ignite

Shulou Source: shulou.com Published: 2022-06-03 04:28:24 10月03日 Update

The server configures two different XML

Example1.xml:

Example2.xml:

Using TcpDiscoveryZookeeperIpFinder, you can use the same ZOOKEEPER instance and use different paths to distinguish clusters.

Ignite-zookeeper is an optional module that needs to be copied from libs/optional before it can be added to CLASSPATH by IGNITE.

And then start separately.

Bin\ ignite.bat examples\ config\ example1.xml

Bin\ ignite.bat examples\ config\ example2.xml

Client configuration

....

Ignition.setClientMode (true)

Ignition.start ("applicationContext-ignite.xml")

Ignite ignite1 = Ignition.ignite ("IgniteCache")

Ignite ignite2 = Ignition.ignite ("IgniteCache1")

Local configuration requires multiple IgniteConfiguration, each corresponding to an IGNITE cluster

GridName in each IgniteConfiguration is different, corresponding to a different cluster name

The connection string and path of the client ZookeeperIpFinder match the corresponding SERVER

There is a singleton IGNITION in the program, but you can have multiple IGNITE instances, each with a name that matches the gridName in the IgniteConfiguration

Note: if you start multiple SERVER locally, the server needs to configure LOCAL PORT for each discoverySpi and communicationSpi

The client needs to configure the LOCAL PORT of communicationSpi, which is different from the server side.

Tags: Different configuration customer client cluster instance multiple path service two name multiple module program Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Docker MySQL Apple macOS