Elasticsearch nodes

hi guys,

I need to know if it is possible to connect two elasticsearch nodes and if so which port can be used to do so?

From what? From where?

Can you explain a bit more?

Edit the elasticsearch.yml on both nodes:

  • Make sure 'cluster.name' is the same on both nodes;
  • Let 'discovery.zen.ping.unicast.hosts' point to each others IP addresses;
    Format: discovery.zen.ping.unicast.hosts ["xxx.xxx.xxx.xxx"]
  • Set 'network.host' to their own IP address and make sure in your firewall they only allow each other to connect to port 9200.

hi David,
To further clarify my question:

company has two different locations, say DC & DR, both these locations have elasticsearch installed. > My requirement was that by keeping the cluster name similar, can I connect between the elasticsearch nodes?
and if it is possible which ports should be opened for the communication between the nodes?

If you mean to share the same cluster across 2 different datacenter, I'd recommend not doing that.

If you have one cluster per Datacenter and want to search in both from the same client, have a look at federated search: https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-cross-cluster-search.html

This is coming in 5.3

Hi David,

I was not talking about sharing two clusters but sharing two nodes.
i wanted to use a single cluster under which there would be two different nodes at two different locations which then would communicate with each other.
Is it possible?

It is technically doable. It is absolutely not recommended because of Latency issues.
We are working on Cross Data Center clusters but it's not ready.

For now, you need to create 2 clusters, one in each region, then push your documents to both clusters.

You can use something like Federated Search to search in both clusters though.

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