# Should I connect to master or data nodes to index new documents?

**URL:** <https://discuss.elastic.co/t/should-i-connect-to-master-or-data-nodes-to-index-new-documents/226124>\
**Category:** Elasticsearch\
**Created:** [April 1, 2020, 9:05pm UTC](https://discuss.elastic.co/t/should-i-connect-to-master-or-data-nodes-to-index-new-documents/226124 "2020-04-01T21:05:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alecrooney](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@alecrooney](https://discuss.elastic.co/u/alecrooney)\
**Post date:** [April 1, 2020, 9:05pm UTC](https://discuss.elastic.co/t/should-i-connect-to-master-or-data-nodes-to-index-new-documents/226124/1 "2020-04-01T21:05:16Z")

</div>

Seems like you can connect to any node and index and query data. If I have a cluster with 3 master nodes and 3+ data nodes, should I connect to the data nodes or master nodes to index or query documents? Should I round robin across the nodes i.e. if I have 6 app processes should those have connections to all elasticsearch nodes or just a single node? What is most efficient?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 1, 2020, 9:06pm UTC](https://discuss.elastic.co/t/should-i-connect-to-master-or-data-nodes-to-index-new-documents/226124/2 "2020-04-01T21:06:41Z")

</div>

Leave dedicated master nodes to manage the cluster and send all requests to the data nodes.

---

<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 29, 2020, 9:07pm UTC](https://discuss.elastic.co/t/should-i-connect-to-master-or-data-nodes-to-index-new-documents/226124/3 "2020-04-29T21:07:00Z")

</div>

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