# Logstash-forwarder reconnect with round robin DNS

**URL:** <https://discuss.elastic.co/t/logstash-forwarder-reconnect-with-round-robin-dns/2101>\
**Category:** Logstash\
**Created:** [June 7, 2015, 8:42pm UTC](https://discuss.elastic.co/t/logstash-forwarder-reconnect-with-round-robin-dns/2101 "2015-06-07T20:42:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![palmerabollo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/palmerabollo/32/44772_2.png) [@palmerabollo](https://discuss.elastic.co/u/palmerabollo)\
**Post date:** [June 7, 2015, 8:42pm UTC](https://discuss.elastic.co/t/logstash-forwarder-reconnect-with-round-robin-dns/2101/1 "2015-06-07T20:42:10Z")

</div>

You can configure a list of servers listening for messages. According to the docs, logstash-forwarder will pick one at random until it appears to be dead or unresponsive.

For example:

```
"servers": ["10.10.10.1:5043", "10.10.10.2:5043"],

```

I wonder whether you can use Round Robin DNS to balance the load:

```
"servers": ["domain-with-multiple-ip-addresses:5043"],

```

I'd like to do that to avoid the need to reconfigure all the forwarders every time you deploy a new listening server or when a server changes its IP. Would logstash-forwarder be able to reconnect given that configuration?

---

<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:** [June 8, 2015, 12:55am UTC](https://discuss.elastic.co/t/logstash-forwarder-reconnect-with-round-robin-dns/2101/2 "2015-06-08T00:55:59Z")

</div>

Yes you can, you see [here](https://github.com/elastic/logstash-forwarder/blob/master/publisher1.go#L168) that it does a DNS lookup if needed.

---

<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:** [July 6, 2017, 5:38am UTC](https://discuss.elastic.co/t/logstash-forwarder-reconnect-with-round-robin-dns/2101/3 "2017-07-06T05:38:15Z")

</div>

Closed on July 6, 2017, 5:38am UTC


