Re:A Server Naming Scheme
by btgeekboy on Thursday July 10, 2014 @12:24AM
(#8013600)
The JVM is another one of those things - DNS lookups are, by default, cached for the life of the VM instance.
[ Parent
| on HN ]
I remember when Java added this feature. It was because lookups in the JVM were atrociously slow, requiring a native layer to get out of the Java sandbox.
Speculating here, I suspect that an important Sun or IBM customer had an app that did lots of DNS lookups and the performance stunk. So, an engineer did a quick 'fix' to cache DNS lookups. Customer was happy, everyone moved on. Some time later this quick fix got ported into the mainline code base. But, it appears that nobody did a proper analysis of this quick fix, ie. respect TTL on DNS. Maybe supporting TTL wasn't important because this was back in the early days of Java when it was trying to win the desktop war and desktop apps weren't really expected to be long lived processes.
Re:A Server Naming Scheme
by unethical_ban on Thursday July 10, 2014 @01:59AM
(#8013837)
God, how awful. That's the point of TTL!
Beyond that, my system has a perfectly functional resolver (and a daemon to manage name service lookups, using policies that our organization has chosen and assumes are being used).
I understand Java doing 'its own thing', because the goal is to provide consistent behaviour on all platforms, but it shouldn't be stupid behaviour.