# Loadbalance Logstash without double ES-data?

**URL:** <https://discuss.elastic.co/t/loadbalance-logstash-without-double-es-data/105523>\
**Category:** Logstash\
**Created:** [October 27, 2017, 6:44am UTC](https://discuss.elastic.co/t/loadbalance-logstash-without-double-es-data/105523 "2017-10-27T06:44:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maekee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maekee/32/21708_2.png) [@Maekee](https://discuss.elastic.co/u/Maekee)\
**Post date:** [October 27, 2017, 6:44am UTC](https://discuss.elastic.co/t/loadbalance-logstash-without-double-es-data/105523/1 "2017-10-27T06:44:11Z")

</div>

Hi,  
The architecture is not done yet, but i want to ask so i know how to Think.

Lets say i have:  
10 clients i want to collect logs from, which will have beatagents.  
2 Logstash servers that the beatagents will send to  
3 Elasticsearch nodes in a cluster.

If i configure the two logstash servers to send incoming data to 2 of the elasticsearch servers.  
Will i get double events in ElasticSearch?

How should i Think here.. i want redundant logstash serversn as i do with ElasticSearch.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 27, 2017, 6:47am UTC](https://discuss.elastic.co/t/loadbalance-logstash-without-double-es-data/105523/2 "2017-10-27T06:47:36Z")

</div>

> If i configure the two logstash servers to send incoming data to 2 of the elasticsearch servers.  
> Will i get double events in Elasticsearch?

No, because the beats agent won't sent the same events to both Logstash instances.

---

<div class="post-metadata">

**Author:** ![Maekee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maekee/32/21708_2.png) [@Maekee](https://discuss.elastic.co/u/Maekee)\
**Post date:** [October 27, 2017, 6:50am UTC](https://discuss.elastic.co/t/loadbalance-logstash-without-double-es-data/105523/3 "2017-10-27T06:50:09Z")

</div>

ok, so if i configure two logstash servers for a beat agents they will try to send to the first, and if they succeed they move on to the next document. But if the first logstash failes to recieve, they move on after x amount of tries to the second logstash server?

---

<div class="post-metadata">

**Author:** ![Maekee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maekee/32/21708_2.png) [@Maekee](https://discuss.elastic.co/u/Maekee)\
**Post date:** [October 27, 2017, 6:54am UTC](https://discuss.elastic.co/t/loadbalance-logstash-without-double-es-data/105523/4 "2017-10-27T06:54:58Z")

</div>

Found the answer to my own question 🙂

> **[Configure the Logstash output | Winlogbeat Reference \[8.11\] | Elastic](https://www.elastic.co/guide/en/beats/winlogbeat/current/logstash-output.html#loadbalance)**

> loadbalanceedit  
> 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.

Really impressed by elastics documentation.😍

---

<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:** [November 24, 2017, 6:55am UTC](https://discuss.elastic.co/t/loadbalance-logstash-without-double-es-data/105523/5 "2017-11-24T06:55:04Z")

</div>

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