Hi,
I was just doing some searching about the question I asked previously about setMembers() and TCP clustering, and I ran across this SO thread:
From that thread, it sounds like, if an application has the same cluster name, and regardless on which physical machine (for example on machine "SVC03") it is on, the Hazelcast on that machine might still join the cluster with that clustername, regardless of whether the IP/hostname of that machine is in the setMembers() (for example if the setMembers() only has "SVC01" and "SVC02")?
Is that correct?
In our case we do:
.setClusterName("dev")
where the cluster name corresponds to one of our specific environments ("dev" means our development environment, vs., say "int" for integration, etc.)
Per code I included in my earlier thread, we also do:
.setInstanceName("app")
where the instance name specifies the application, e.g., "app1", "app2", etc.
Now, as I understand it, one of the reasons I was asked to look into TCP discovery/clustering is that we have several servers whose purpose is specifically for hosting all of our (for example) Spring Boot services, and several of those services/apps also utilize Hazelcast, and also we want to use Hazelcast clustering with those other apps, AND we want the caches among the different apps to be separate.
The question that I have is: Suppose that we have 2 of the SVC machines, and the clustername corresponds to the environment (so, for example, ALL apps on the service machines in the environment would have clustername "dev" since they are all in the same development environment), and each service/app has a different instance name, will:
a) the cache instances (e.g., "app1", "app2", etc.) on each SVC machine be separate from each other? and
b) if there is another machine, say "foreignSVC", that is not included in the setMembers() list on an app on either the SVC01 or SVC02 machine, and there is an instance of an app that is using Hazelcast TCP discovery/clustering on the "foreignSVC" machine, and the app on the "foreignSVC" machine has setMembers() that includes, say, SVC01 in the list, will the Hazelcast on the the "foreignSVC" machine be able to join the "dev" cluster?
Sorry, I know the question is kind of convoluted and I hope I got the terminology and wording ok :(...
Thanks in advance (again),
Jim