# Loadbalance question

**URL:** https://discuss.elastic.co/t/loadbalance-question/125396
**Category:** Beats
**Tags:** filebeat
**Created:** [March 23, 2018, 5:28pm UTC](https://discuss.elastic.co/t/loadbalance-question/125396 "2018-03-23T17:28:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yodog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yodog/32/4822_2.png) [@yodog](https://discuss.elastic.co/u/yodog)
#### Post date: [March 23, 2018, 5:28pm UTC](https://discuss.elastic.co/t/loadbalance-question/125396/1 "2018-03-23T17:28:34Z")

</div>

i've read that `loadbalance: false` will try another host if the selected one becomes unresponsive.

> loadbalance
> 
> If set to true and multiple Logstash hosts are configured, the output plugin  
> load balances published events onto all Logstash hosts. If set to false, the  
> output plugin sends all events to only one host (determined at random) and will  
> switch to another host if the selected one becomes unresponsive.  
> The default value is false.

does setting `loadbalance: true` also enable failover?

or will it wait forever? or even worse, drop the data?

---

<div class="post-metadata">

### Author: ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)
#### Post date: [March 23, 2018, 9:27pm UTC](https://discuss.elastic.co/t/loadbalance-question/125396/2 "2018-03-23T21:27:52Z")

</div>

Hi @yodog,

from the docs:

> If set to false, the  
> output plugin sends all events to only one host (determined at random) and will  
> switch to another host if the selected one becomes unresponsive.

That means that in case of error it will try the next one on the list

---

<div class="post-metadata">

### Author: ![yodog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yodog/32/4822_2.png) [@yodog](https://discuss.elastic.co/u/yodog)
#### Post date: [March 23, 2018, 9:48pm UTC](https://discuss.elastic.co/t/loadbalance-question/125396/3 "2018-03-23T21:48:29Z")

</div>

Ah yes  
I've got the 'false' behavior. 🙂  
My question is: does it behave the same if set to 'true'?

---

<div class="post-metadata">

### Author: ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)
#### Post date: [March 26, 2018, 7:48am UTC](https://discuss.elastic.co/t/loadbalance-question/125396/4 "2018-03-26T07:48:55Z")

</div>

Yes, it should go to a different host if one fails

---

<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 23, 2018, 7:48am UTC](https://discuss.elastic.co/t/loadbalance-question/125396/5 "2018-04-23T07:48:56Z")

</div>

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