What is the correct setup needed for remote cluster?

Hi Everyone,

Elasticsearch version - 6.4.1

Can we have the remote cluster with two nodes which are present in the same cluster (i.e node1 (active master node) and node2 in cluster (cluster name: cluster1))?

The reason I'm asking this is because I'm able to successfully set the remote cluster when both the nodes are present in same cluster.

[root@node2 ~]# curl -X PUT "node2:9200/_cluster/settings" -H 'Content-Type: application/json' -d'

{
"persistent": {
"search": {
"remote": {
"cluster_one": {
"seeds": [
"10.x.x.1:9300"
]
}
}
}
}
}
'
{"acknowledged":true,"persistent":{"search":{"remote":{"cluster_one":{"seeds":["10.x.x.1:9300"]}}}},"transient":{}}[root@node2 ~]#

Also, should we configure remote cluster when both the nodes are present in different clusters?

Kindly help with the setup. I'm following the given below link:

Thanks & Regards
Nikhil Kapoor

Can anyone help me with this?

What are you trying to achieve? How is the cluster to be deployed? What is your use case?

Hi @Christian_Dahlqvist,

Thanks for your response. I want to setup a remote cluster setup. I have two nodes with roles as Master & Data. I am confused to setup a remote cluster, both the nodes should be indifferent cluster or same clusters.

Then, I want to perform cross cluster search.

Regards
Nikhil Kapoor

How far apart are the nodes? Are they in different data centres?

The machines are present on different machines in a building. I want to understand and implementation of the remote cluster and cross cluster scenario.

Cross-cluster search is used to query across multiple, distinct clusters. If the nodes form a single cluster there is therefore no need for cross cluster search. If you set them up as separate clusters with different names, you should configure the remote cluster and use cross cluster search.

@Christian_Dahlqvist okay got your point about cross cluster but what about remote cluster? Can we configure a remote cluster in single cluster only.

Remote cluster indicates that you are connecting to a different cluster, so is not applicable if both node form part of the same cluster.

Okay understood your point for remote cluster too.

So, know i want to tell you that when two nodes are in same cluster and cluster update settings command is executed to configure remote cluster (on any node) , it observed that it is set successfully. I think an error should be shown on console that Cannot set the remote cluster as nodes are in same cluster

I think it's a bug? What do you think @Christian_Dahlqvist

I am not sure I understand what you are trying to do. Can you explain at a high level what you are trying to achieve?

Suppose there are two nodes in a cluster (cluster name: cluster1)

  1. Node1: 10.x.x.1 (active master node)
  2. Node2: 10.x.x.2

Now suppose below command is executed:
[root@node2 ~]# curl -X PUT "node2:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent": {
"search": {
"remote": {
"cluster_one": {
"seeds": [
"10.x.x.1:9300"
]
}
}
}
}
}
'
{"acknowledged":true,"persistent":{"search":{"remote":{"cluster_one":{"seeds":["10.x.x.1:9300"]}}}},"transient":{}}[root@node2 ~]#

It is observed that no error is shown on the console Cannot set the remote cluster as nodes are in same cluster instead acknowledgement is sent to the user.

Does it now make some sense @Christian_Dahlqvist

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