# Which node to connect to

**URL:** <https://discuss.elastic.co/t/which-node-to-connect-to/276408>\
**Category:** Elasticsearch\
**Created:** [June 18, 2021, 4:42pm UTC](https://discuss.elastic.co/t/which-node-to-connect-to/276408 "2021-06-18T16:42:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bo-Wyatt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bo-wyatt/32/87748_2.png) [@Bo-Wyatt](https://discuss.elastic.co/u/Bo-Wyatt)\
**Post date:** [June 18, 2021, 4:42pm UTC](https://discuss.elastic.co/t/which-node-to-connect-to/276408/1 "2021-06-18T16:42:47Z")

</div>

Hello, this is a dum question. But I have two nodes on my cluster (One is master). And I always use the master IP (or URL) to fetch for Info, for example in my Grafana data source I use the Node1 URL to Connect.  
Is always this way? I need always to connect to the master node in order to fetch for data? Or I can use any node to fetch for data (for example in Grafana, Elastalert or any other systems).

Does this practice doesn't achieve availability ? Since I'm always using one node to fetch for data

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [June 19, 2021, 10:25am UTC](https://discuss.elastic.co/t/which-node-to-connect-to/276408/2 "2021-06-19T10:25:57Z")

</div>

The node you connect to in order to run searches is coordinator node/[role](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/modules-node.html) which every node is capable of doing.

A 2 nodes cluster is to be avoided as it means there is no high-availability (better to have 3 master-data nodes - or 2 master-data and a voting-only node) and there is also no advantage of dedicated master node if you only have 2 nodes...  
It's not clear in your question what are the roles ([GET \_cat/nodes?v](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/cat-nodes.html)) but assuming 2 scenarios :

1. If it's one master-dedicated and a data node, you should use the data nodes as coordinator. In this scenario if the data-node fails, as there is no replica shard assigned with only one data node the cluster and all indices will turn red (no shard/index available for search nor write), if the master fails the cluster turns red because it lacks an elected master.
2. If you have one master-data and one data node, you would normally connect to either/both nodes as coordinator node with a note in this case that assuming indices have 1 replica, cluster will turn yellow (search and write still available) when the data-only node fails, while obviously a failure of the master-data means the cluster becomes unavailable because it has no elected master (you should better have 2 master-data and add a low-specs voting-only node for [quorum](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/modules-discovery-quorums.html), the voting-only node would not be used as coordinator node in that case)

Thanks  
Julien

---

<div class="post-metadata">

**Author:** ![Bo-Wyatt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bo-wyatt/32/87748_2.png) [@Bo-Wyatt](https://discuss.elastic.co/u/Bo-Wyatt)\
**Post date:** [June 22, 2021, 11:58am UTC](https://discuss.elastic.co/t/which-node-to-connect-to/276408/3 "2021-06-22T11:58:28Z")

</div>

Now it's a little bit more clear. I thought that you can only have one master node. So my best scenario is to have 3 master-data nodes (what about ingest nodes?). And If I want to retrieve Info I can use any node

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [June 28, 2021, 7:55pm UTC](https://discuss.elastic.co/t/which-node-to-connect-to/276408/4 "2021-06-28T19:55:55Z")

</div>

Yes, by default nodes have all roles assigned, ingest (for running ingest pipelines if you use that) and coordinator (for collecting result of multiple searches) roles  
Thanks  
Julien

---

<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:** [July 26, 2021, 7:56pm UTC](https://discuss.elastic.co/t/which-node-to-connect-to/276408/5 "2021-07-26T19:56:01Z")

</div>

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