Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Local multiple instances of Ignite

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report