Will the remote cluster join the local cluster if they have the same name when using cross cluster search?

Just wondering whether there the gateway node(s) will join the local cluster if they are using the same cluster name? Because according to https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-discovery-bootstrap-cluster.html#_choosing_a_cluster_name, it could be.

It depends on how your environment is set up, but it is possible that this could happen in versions prior to 7.0 if your configuration allows it. In 7.0 we have taken extra steps to prevent this. We recommend giving them different cluster names just to be sure, and also because it will be much less confusing to have different names for your different clusters.

My configuration is simply both clusters have the same name before I enable the cross-cluster search. So I am worrying they will join after I open the port(9300) and communication between them.

So obviously one way to avoid this is to rename one of the clusters (assuming remote cluster), do you have some guild on how to do it properly in production?

Is there another way (some configuration?) rather than renaming the cluster?

It is only possible to rename a cluster by performing a full cluster restart.

You must prevent the nodes in each cluster from discovering one another when attempting to elect a master. This means that you must be certain that discovery.zen.ping.unicast.hosts doesn't mention hosts in the other cluster, and that if you are using any discovery plugins then they also must not be able to find nodes in the other cluster.

1 Like

Thanks for your help very much.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.