# Load balancing a 3 x Logstash behind PowerDNS setup

**URL:** <https://discuss.elastic.co/t/load-balancing-a-3-x-logstash-behind-powerdns-setup/163991>\
**Category:** Logstash\
**Created:** [January 12, 2019, 11:32am UTC](https://discuss.elastic.co/t/load-balancing-a-3-x-logstash-behind-powerdns-setup/163991 "2019-01-12T11:32:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zerobot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerobot/32/48977_2.png) [@Zerobot](https://discuss.elastic.co/u/Zerobot)\
**Post date:** [January 12, 2019, 11:32am UTC](https://discuss.elastic.co/t/load-balancing-a-3-x-logstash-behind-powerdns-setup/163991/1 "2019-01-12T11:32:54Z")

</div>

HI!

So in my setup I'm pushing logs with NXLog (aix) and Filebeat (linux) into 3 logstashes (3 nodes). We have PowerDNS setup to forward everyting from dns "example.logstash.dns" into 3 IP adressess of those logstashes.Logstashes are not in a cluster of course so my question is: is there any way to reasonably load balance input's from nxlog and filebeat into those 3 logstashes?  
I'm trying to avoid situation where "big producers" are not balanced/split on all 3 logstash nodes evenly.

Also I'm trying to setup:

> hosts: ["example.logstash.dns:5044"]  
> loadbalance: true  
> worker: 3

But it seems it doesn't work as expected with PowerDNS forwarding .

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [January 12, 2019, 4:43pm UTC](https://discuss.elastic.co/t/load-balancing-a-3-x-logstash-behind-powerdns-setup/163991/2 "2019-01-12T16:43:13Z")

</div>

The answers in this thread will probably help:

> [@Load balancing with a single Logstash output](https://discuss.elastic.co/t/load-balancing-with-a-single-logstash-output/55756/4):
>
> if I point Filebeat to a Logstash host with a DNS name of logstash.service.consul, which resolves to three IP addresses, can I expect Filebeat to load balance traffic across these three IP addresses? No. I'm wondering how/when Filebeat resolves DNS Filebeat queries for a list of all known IPs for some given host name. how/if Filebeat handles DNS records that resolve to multiple IP addresses Filebeat selects one of the IP-addresses by random and attempts to create exactly one network c…

---

<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:** [February 9, 2019, 4:43pm UTC](https://discuss.elastic.co/t/load-balancing-a-3-x-logstash-behind-powerdns-setup/163991/3 "2019-02-09T16:43:16Z")

</div>

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