Cross-cluster-search

Hi,

I am using AWS EC2 linux servers with self-managed Elasticsearch usage.
Now, I have to search data from Elasticsearch Indices which are located in two different regions. For this I came to know we have to use cross-cluster-search functionality.

As these are EC2 servers, i have configured with private IP's of both as below,

{
  "persistent": {
    "cluster": {
      "remote": {
        "ireland_cluster": {
          "seeds": [
            "<private_IP>:9301"
          ],
          "transport.ping_schedule": "60s"
        },
        "singapore_cluster": {
          "seeds": [
            "<private_IP>:9302"
          ],
          "transport.compress": false
        }
      }
    }
  }
}

I ran the above query in both the clusters.
With the above configuration, when i execute below query,
GET <private_IP of ireland>:9200/ireland_cluster:index,singapore_cluster:index/_search
I am getting below error,

type": "connect_transport_exception",

"reason": "[<private_IP>:9302] connect_timeout[30s]

Could someone please help me on this issue.

Thanks & Regards,
Ram

It looks like your network is not correctly configured for these instances to communicate with each other on their private IP addresses. Setting this up correctly is outside the scope of what I can help you with, but perhaps this documentation on VPC peering is what you're looking for?

Hi David,

Thank you very much for your fast reply.
But I came to know that we have done the VPC peering.

Let me explain clearly what we are trying to do.

  1. Windows machine from which we will be hitting both linux EC2(where Elasticsearch installed)
  2. I have created sample index in both region's elasticsearch

Now I tried hitting like below from windows machine,

http://<private_IP of ireland>:9200/:sample_index/_search

it is giving connection time_out error.
Thanks & Regards,
Ram

It still sounds like a basic AWS connectivity issue, and you'll likely get more useful help on a more AWS-focussed forum. For this to work your Windows machine also needs to be on a network on which the private IP addresses of your EC2 instances are reachable (e.g. within one of their VPCs or within another VPC to which they are peered).