# Request routing to elastic nodes

**URL:** <https://discuss.elastic.co/t/request-routing-to-elastic-nodes/79071>\
**Category:** Elasticsearch\
**Created:** [March 17, 2017, 5:43pm UTC](https://discuss.elastic.co/t/request-routing-to-elastic-nodes/79071 "2017-03-17T17:43:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chayanchit](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chayanchit](https://discuss.elastic.co/u/chayanchit)\
**Post date:** [March 17, 2017, 5:43pm UTC](https://discuss.elastic.co/t/request-routing-to-elastic-nodes/79071/1 "2017-03-17T17:43:47Z")

</div>

My need: Have around 60K documents totalling 300MB. There will be writes/updates but volume wouldn't be high. GET requests would be high and I need to ensure high availability and high performance.

My prototype design: I have a Java client (microservice containers on Kubernetes) and using org.elasticsearch.client.RestClient to fire http requests to the elasticsearch node using IP address of the node (RestClient.builder(new HttpHost(elasticsearchHost, elasticsearchPort, "http"))).

Production design: After going through documentation, I thought I can have 3 nodes with 2 master eligible nodes (each node has 1 shard and 1 replica; each node - 16GB RAM, 6VCPUs). I am NOT planning to segregate master, node and ingest nodes as my document volume is not too high.

Problem statement: How do I modify my RestClient to send the http requests in a load balanced way (round robin fashion) to each of three nodes.

As this is my first venture into elasticsearch, I seek guidance from experts in this forum to validate if my production configuration looks optimized, and also how do I get to a solution over my problem statement.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 17, 2017, 8:19pm UTC](https://discuss.elastic.co/t/request-routing-to-elastic-nodes/79071/2 "2017-03-17T20:19:57Z")

</div>

> [@chayanchit](#):
>
> 3 nodes with 2 master eligible nodes

That's bad, see [Important Configuration Changes | Elasticsearch: The Definitive Guide [2.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/important-configuration-changes.html#_minimum_master_nodes)

> [@chayanchit](#):
>
> Problem statement: How do I modify my RestClient to send the http requests in a load balanced way (round robin fashion) to each of three nodes.

Pretty sure our clients handle load balancing if you list multiple hosts.

---

<div class="post-metadata">

**Author:** ![chayanchit](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chayanchit](https://discuss.elastic.co/u/chayanchit)\
**Post date:** [March 30, 2017, 12:16pm UTC](https://discuss.elastic.co/t/request-routing-to-elastic-nodes/79071/3 "2017-03-30T12:16:55Z")

</div>

Thank. I realized I could add multiple IPs in the RestClient call leaving it to handle the load balancing.

---

<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 27, 2017, 12:16pm UTC](https://discuss.elastic.co/t/request-routing-to-elastic-nodes/79071/4 "2017-04-27T12:16:56Z")

</div>

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