Github user hanm commented on the issue:

    https://github.com/apache/zookeeper/pull/451
  
    There are also some initial comments about JVM DNS caching
    
    >> Re-resolving at StaticHostProvider level may not be sufficient as 
InetAddress.getAllByName(String host) itself uses a Java-level cache inside 
InetAddress and turns to name service (e.g. DNS) only if the host could not be 
found in the Java-level cache.
    
    I think it's a good point that we brought this up - and I think we can't do 
much here as there are multiple level of DNS caching not just in JVM but also 
in OS, switches, etc, so the best we could do here is to make sure we 
re-resolve address when necessary, as this pull request is doing, and meanwhile 
let user know this might not work in the end due to multiple level of DNS 
caching. In that case, I think some links to the Oracle documents about JVM DNS 
caching would be helpful so users don't blame ZooKeeper if things don't work, 
but I think we can do that documentation update separately after this pull 
request is merged.


---

Reply via email to