# Load balancer for elasticsearch cluster

**URL:** <https://discuss.elastic.co/t/load-balancer-for-elasticsearch-cluster/280589>\
**Category:** Elasticsearch\
**Created:** [August 5, 2021, 7:29pm UTC](https://discuss.elastic.co/t/load-balancer-for-elasticsearch-cluster/280589 "2021-08-05T19:29:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![markrity](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markrity/32/100712_2.png) [@markrity](https://discuss.elastic.co/u/markrity)\
**Post date:** [August 5, 2021, 7:29pm UTC](https://discuss.elastic.co/t/load-balancer-for-elasticsearch-cluster/280589/1 "2021-08-05T19:29:41Z")

</div>

- Elasticsearch version - 5.1.2
- 16GB of max heap configured
- Installed and used enterprise modules, if any - No
- JVM version and operating system version - openjdk version "1.8.0\_292" , CentOS
- Other installed Elasticsearch or Kibana plugins, if any - None  
Configuration: Google Loadbalancer -\> 3 Instances -\> 3 data and master nodes (master and data on same instances)

Hi, my setup right now has 3 instances with both data and master on each of them.  
I use Google internal load balancer "before" instance group of this instances.  
Recently I have configured a NewRelic monitoring for this cluster and I have seen this picture

 ![Screen Shot 2021-08-05 at 22.09.09](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8ed90d4a701c52caa6a50e1e2487e68e28e2f363.png)

The interesting part is Open http connections and READ IO Operations that it shows on es-node-1.

I wonder what would be a best practice or a suggestion having this configuration and what is the best way for connecting an application to cluster? Directly to one of nodes? Using load balancer same way I use it now ? DNS with round robin ? Any other 3rd party LB solution for ES?

---

<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:** [August 9, 2021, 12:19am UTC](https://discuss.elastic.co/t/load-balancer-for-elasticsearch-cluster/280589/2 "2021-08-09T00:19:45Z")

</div>

I guess it depends on how the load balancer is setup to talk to the cluster?

> [@markrity](#):
>
> - Elasticsearch version - 5.1.2

5.X is very much [EOL](https://www.elastic.co/support/eol), please upgrade as a matter of urgency.

---

<div class="post-metadata">

**Author:** ![markrity](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markrity/32/100712_2.png) [@markrity](https://discuss.elastic.co/u/markrity)\
**Post date:** [August 9, 2021, 9:44am UTC](https://discuss.elastic.co/t/load-balancer-for-elasticsearch-cluster/280589/3 "2021-08-09T09:44:02Z")

</div>

> [@warkolm](#):
>
> I guess it depends on how the load balancer is setup to talk to the cluster?

Hi Mark, thanks for reply,  
The load balancer is an Internal TCP load balancer Pass-through.  
I'm trying to figure out what would be the best way to connect an application to elasticcluster?

---

<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:** [August 9, 2021, 10:11pm UTC](https://discuss.elastic.co/t/load-balancer-for-elasticsearch-cluster/280589/4 "2021-08-09T22:11:02Z")

</div>

That depends on the application.  
If you are using an official client then it will handle the load balancing etc. Otherwise, HTTP level would make sense.

---

<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:** [September 6, 2021, 10:11pm UTC](https://discuss.elastic.co/t/load-balancer-for-elasticsearch-cluster/280589/5 "2021-09-06T22:11:30Z")

</div>

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