# Elasticsearch nodes

**URL:** https://discuss.elastic.co/t/elasticsearch-nodes/78346
**Category:** Elasticsearch
**Created:** [March 13, 2017, 1:30pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346 "2017-03-13T13:30:58Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ArjunSISA](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ArjunSISA](https://discuss.elastic.co/u/ArjunSISA)
#### Post date: [March 13, 2017, 1:30pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346/1 "2017-03-13T13:30:58Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 13, 2017, 2:32pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346/2 "2017-03-13T14:32:50Z")

</div>

From what? From where?

Can you explain a bit more?

---

<div class="post-metadata">

### Author: ![slinky](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slinky/32/13323_2.png) [@slinky](https://discuss.elastic.co/u/slinky)
#### Post date: [March 13, 2017, 2:46pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346/3 "2017-03-13T14:46:21Z")

</div>

Edit the _elasticsearch.yml_ on both nodes:

- Make sure '_[cluster.name](http://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.

---

<div class="post-metadata">

### Author: ![ArjunSISA](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ArjunSISA](https://discuss.elastic.co/u/ArjunSISA)
#### Post date: [March 14, 2017, 7:47am UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346/4 "2017-03-14T07:47:19Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 14, 2017, 8:30pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346/5 "2017-03-14T20:30:28Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-cross-cluster-search.html)

This is coming in 5.3

---

<div class="post-metadata">

### Author: ![ArjunSISA](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ArjunSISA](https://discuss.elastic.co/u/ArjunSISA)
#### Post date: [March 22, 2017, 1:23pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346/6 "2017-03-22T13:23:16Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 22, 2017, 2:16pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346/7 "2017-03-22T14:16:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 19, 2017, 2:16pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes/78346/8 "2017-04-19T14:16:54Z")

</div>

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