# Which Elasticsearch node should I send my query to?

**URL:** <https://discuss.elastic.co/t/which-elasticsearch-node-should-i-send-my-query-to/337937>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [July 8, 2023, 1:02pm UTC](https://discuss.elastic.co/t/which-elasticsearch-node-should-i-send-my-query-to/337937 "2023-07-08T13:02:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANUBHAV\_GUPTA](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@ANUBHAV\_GUPTA](https://discuss.elastic.co/u/ANUBHAV_GUPTA)\
**Post date:** [July 8, 2023, 1:02pm UTC](https://discuss.elastic.co/t/which-elasticsearch-node-should-i-send-my-query-to/337937/1 "2023-07-08T13:02:40Z")

</div>

Let's say I have a cluster with total of 10 nodes where 4 are master eligible and rest are data nodes.  
So, how can I decide to which endpoint I should ping to have the best availability?

---

<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:** [July 9, 2023, 7:31pm UTC](https://discuss.elastic.co/t/which-elasticsearch-node-should-i-send-my-query-to/337937/2 "2023-07-09T19:31:27Z")

</div>

Any (sufficiently-well-resourced) node is fine, although if you have dedicated master nodes then generally it's best to avoid sending client requests there. See these docs for more info:

- [Resilience in small clusters | Elasticsearch Guide [8.8] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/high-availability-cluster-small-clusters.html)
- [Node | Elasticsearch Guide [8.8] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#dedicated-master-node)

---

<div class="post-metadata">

**Author:** ![ANUBHAV\_GUPTA](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@ANUBHAV\_GUPTA](https://discuss.elastic.co/u/ANUBHAV_GUPTA)\
**Post date:** [July 10, 2023, 2:16am UTC](https://discuss.elastic.co/t/which-elasticsearch-node-should-i-send-my-query-to/337937/3 "2023-07-10T02:16:36Z")

</div>

Thanks for the reply @DavidTurner.

But What if, the node to which I am sending my queries went down then my whole cluster will be unreachable.  
Is there a way I can have a reverse proxy kind of a thing which will redirect my request to the available node for the client request?

---

<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:** [July 10, 2023, 6:45am UTC](https://discuss.elastic.co/t/which-elasticsearch-node-should-i-send-my-query-to/337937/4 "2023-07-10T06:45:51Z")

</div>

This is already answered by the docs I linked:

> - Clients are configured to send their requests to more than one node or are configured to use a load balancer that balances the requests across an appropriate set of nodes. The [Elastic Cloud](https://www.elastic.co/cloud/elasticsearch-service/signup?baymax=docs-body&elektra=docs) service provides such a load balancer.

---

<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:** [August 7, 2023, 6:46am UTC](https://discuss.elastic.co/t/which-elasticsearch-node-should-i-send-my-query-to/337937/5 "2023-08-07T06:46:28Z")

</div>

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