# Confirmation about the load balance mechanism when using elasticsearch output

**URL:** <https://discuss.elastic.co/t/confirmation-about-the-load-balance-mechanism-when-using-elasticsearch-output/65581>\
**Category:** Logstash\
**Created:** [November 10, 2016, 5:35am UTC](https://discuss.elastic.co/t/confirmation-about-the-load-balance-mechanism-when-using-elasticsearch-output/65581 "2016-11-10T05:35:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)\
**Post date:** [November 10, 2016, 5:35am UTC](https://discuss.elastic.co/t/confirmation-about-the-load-balance-mechanism-when-using-elasticsearch-output/65581/1 "2016-11-10T05:35:28Z")

</div>

According to [document](https://www.elastic.co/guide/en/logstash/5.0/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts) elasticsearch output load balances the requests to elasticsearch when multiple hosts are set in **hosts**.

> Sets the host(s) of the remote instance. If given an array it will load balance requests across the hosts specified in the hosts parameter. Remember the http protocol uses the http address (eg. 9200, not 9300). "127.0.0.1" ["127.0.0.1:9200","127.0.0.2:9200"] ["[http://127.0.0.1](http://127.0.0.1)"] ["[https://127.0.0.1:9200](https://127.0.0.1:9200)"] ["[https://127.0.0.1:9200/mypath](https://127.0.0.1:9200/mypath)"] (If using a proxy on a subpath) It is important to exclude dedicated master nodes from the hosts list to prevent LS from sending bulk requests to the master nodes. So this parameter should only reference either data or client nodes in Elasticsearch.

Does load balance mean round robin or simply goes to the next node when the node communicating dies?

---

<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:** [November 14, 2016, 10:30am UTC](https://discuss.elastic.co/t/confirmation-about-the-load-balance-mechanism-when-using-elasticsearch-output/65581/2 "2016-11-14T10:30:44Z")

</div>

It round robins.

---

<div class="post-metadata">

**Author:** ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)\
**Post date:** [November 17, 2016, 10:24am UTC](https://discuss.elastic.co/t/confirmation-about-the-load-balance-mechanism-when-using-elasticsearch-output/65581/3 "2016-11-17T10:24:26Z")

</div>

@warkolm

Ok . Got it.

---

<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:** [December 15, 2016, 10:24am UTC](https://discuss.elastic.co/t/confirmation-about-the-load-balance-mechanism-when-using-elasticsearch-output/65581/4 "2016-12-15T10:24:42Z")

</div>

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