5
votes

Ignite has two modes, one is Server mode, and the other is client mode.I am reading https://apacheignite.readme.io/docs/clients-vs-servers, but didn't get a good understanding of these two modes.

In my opinion, there are two use cases:

  1. If the Ignite is used as an embedded server in a java application, they the Ignite should be in server mode, that is, Ignite should be started with

    Ignite ignite = Ignition.start(configFile)

  2. If I have setup an Ignite cluster that are running as standalone processes. Then in my java code, I should start Ignite in client mode, so that the client mode Ignite can connect to the Ignite cluster, and CRUD the cache data that resides in the ignite cluster?

    Ignition.setClientMode(true);

    Ignite ignite = Ignition.start(configFile)

3

3 Answers

6
votes

Yeah, this is correct understanding. Ignite client mode intended as lightweight mode (which do not store data and do not execute compute tasks). Client node should communicate with a cluster and should not utilize self resources.

Client does not even started without server node presented in topology.

0
votes

In order to further add to @Makros answer, Ignite Client stores data if near cache is enabled. This is done in order to increase the performance of cache retrievals.

0
votes

Yeah, you are right in ignite client has IgniteConfiguration.setClientMode(true); and for server IgniteConfiguration.setClientMode(false);, which is default value. if set IgniteConfiguration.setClientMode(false); in you code or forget to set setClientMode(); it will work as server.