0
votes

I have a running Ignite cluster and I use AWS S3 for node discovery:

TcpDiscoveryS3IpFinder ipFinder = new TcpDiscoveryS3IpFinder();
BasicAWSCredentials awsCredentials =
    new BasicAWSCredentials(igniteAccessKey, igniteSecretAccessKey);
ipFinder.setAwsCredentials(awsCredentials);
ipFinder.setBucketName(igniteBucketName);
ipFinder.setBucketEndpoint("s3.eu-central-1.amazonaws.com");

TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(ipFinder);

IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setClientMode(true);

cfg.setDiscoverySpi(spi);
Ignition.start(cfg);    

It works very well and I can connect to this cluster using Apache Ignite Client nodes.

But what about Apache Ignite Thin Client? Thin client uses ClientConfiguration class (instead of IgniteConfiguration) that requires a list of IP addresses of cluster nodes. AFAIK one can only hardcode that list of IP addresses.
From official documentation:

ClientConfiguration cfg = new ClientConfiguration().setAddresses("127.0.0.1:10800");
try (IgniteClient client = Ignition.startClient(cfg)) {
    ClientCache<Integer, String> cache = client.cache("myCache");
    // Get data from the cache
}

So I have questions:

  1. How should I handle situations when a list of IP addresses change?
  2. Is there any way to use node discovery for Thin clients?
1

1 Answers

0
votes

You can use domain names as well as IP addresses. But you can't use node discovery with thin clients.