Which Elasticsearch node should I send my query to?

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?

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:

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?

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 service provides such a load balancer.

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