Using DNS to define master list in discovery.zen.ping.unicast.hosts


(Jaren Glover) #1

I am using elasticsearch 2.3.4. In the past we have explicitly provided the IP's in discovery.zen.ping.unicast.hosts. This isn't idea because when I am upgrading clusters, I now have to remember to update the static list of IPs.

I would like to change this to using DNS (specifically consul DNS).

example: discovery.zen.ping.unicast.hosts: ['elasticsearch-master.consul.dns']

A few questions about how elasticsearch deals with DNS.

  • Is there any specific risk to using DNS in the list provided to discovery.zen.ping.unicast.hosts ? (assuming DNS is working with health host)
  • How does the elasticsearch process items list? If the node can't reach the first node does it retry the DNS? "A fresh request"
  • can i only put one DNS entry or should I repeat the DNS entry because the list is only read once?

(Mark Walkom) #2

https://github.com/elastic/elasticsearch/issues/16412 might be of interest here.


(Jaren Glover) #3

I read this issues as:

  • this is a java issue not a elasticsearch which impacts logstash and elasticsearch
  • you should be specific about your IP and if they change you should update your .yml via your CM
  • or force an restart of the elasticsearch process.

fair summary? Are there any good documentation on how to setting the java.security file to dynamicly resolve DNS and not cache.


(Ed) #4

http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-jvm-ttl.html


(system) #5