# ES two node cluster doubt

**URL:** <https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399>\
**Category:** Elasticsearch\
**Created:** [May 16, 2019, 12:50pm UTC](https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399 "2019-05-16T12:50:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suryadip\_Nag](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Suryadip\_Nag](https://discuss.elastic.co/u/Suryadip_Nag)\
**Post date:** [May 16, 2019, 12:50pm UTC](https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399/1 "2019-05-16T12:50:04Z")

</div>

If there is two node with two different ip in ES cluster setup then the indexing request will go to only master node and the data will be indexed to master node and not in the other node?

If yes then how the other node gets the indexed data?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 16, 2019, 1:10pm UTC](https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399/2 "2019-05-16T13:10:44Z")

</div>

No, the master node is normally not involved in indexing at all. The data is indexed into the primary and all replicas. Perhaps [this section of the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-concepts.html#getting-started-shards-and-replicas) is helpful?

---

<div class="post-metadata">

**Author:** ![Suryadip\_Nag](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Suryadip\_Nag](https://discuss.elastic.co/u/Suryadip_Nag)\
**Post date:** [May 16, 2019, 1:15pm UTC](https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399/3 "2019-05-16T13:15:08Z")

</div>

Okay thanks for the info.. One last doubt,  
Without mentioning the other host nodes ip in discovery.zen.ping.unicast.hosts in elasticsearch.yml file is there any other option so that the node will be joined and form a cluster?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 16, 2019, 5:40pm UTC](https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399/4 "2019-05-16T17:40:54Z")

</div>

> [@Suryadip\_Nag](#):
>
> is there any other option so that the node will be joined and form a cluster?

I'm not quite sure how to answer this yet. Can you explain why you need another option?

---

<div class="post-metadata">

**Author:** ![Suryadip\_Nag](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Suryadip\_Nag](https://discuss.elastic.co/u/Suryadip_Nag)\
**Post date:** [May 17, 2019, 6:08am UTC](https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399/5 "2019-05-17T06:08:51Z")

</div>

We are using the following java class in our project downloaded from open source ES code repository.

> <https://github.com/elastic/elasticsearch/blob/5.5/plugins/discovery-file/src/main/java/org/elasticsearch/discovery/file/FileBasedUnicastHostsProvider.java>

This FileBasedUnicastHostsProvider.java file has the code which I believe picking up the hosts from /etc/hosts in Linux and automatically joining the nodes..It was working till ES5.5. We didn't need to mention the other nodes ip in discovery.zen.ping.unicast.hosts . But we have upgraded to 6.5 and we noticed in the ES source code repo, that java file is no longer available so we deleted that java file in our project as well.

Now nodes are not joining cluster unless we mention the other nodes ip in discovery.zen.ping.unicast.hosts.

Any idea about this FileBasedUnicastHostsProvider.java file ?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 17, 2019, 6:52pm UTC](https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399/6 "2019-05-17T18:52:23Z")

</div>

> [@Suryadip\_Nag](#):
>
> We are using the following java class in our project downloaded from open source ES code repository.

I don't understand. This class is part of Elasticsearch and is not suitable for use in other projects.

---

<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:** [June 14, 2019, 6:52pm UTC](https://discuss.elastic.co/t/es-two-node-cluster-doubt/181399/7 "2019-06-14T18:52:27Z")

</div>

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