How do I confirm DNS round robin is working correctly?

I have logstash pointing to a round robin DNS record:

elasticsearch {
  hosts => my.cluster.com
  index => "myindex"
  ....etc

How can I confirm logstash is load balancing across all those servers? Or more importantly if its only going to one of those servers?

I don't think LS will load balance based on multiple DNS entries will it? The docs aren't really clear on that.

I thought it did. According to the docs elasticsearch and logstash support round robin.

If logstash only uses round robin for failover then I guess I cant use it.

Right now I have logstash outputting to three nodes in my cluster

If you just specify one URL, I suspect it will look like a single node to Logstash. Logstash will generally use multiple connections, which with your setup is likely to hit multiple nodes, but I do not see any way for Logstash to control the distribution.

Hang on just want to confirm this:
Right now I have the logstash "hosts" parameter set to 3 different IP addresses.
Are you saying that logstash isn't load balancing across these addresses? Maybe I always misunderstood how this works.

If you specify 3 node IPs, Logstash knows about them and can handle load distribution.

OK good so at least that is doing what I think it is.

But we aren't sure that if I specify a single DNS entry with multiple A records for the hosts parameter logstash is smart enough to load balance across all IPs it receives from my round robin enabled DNS server for that record- right?

Yes, that is what I was referring to.
Not multiple host entries in the config file.

1 Like

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