Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Late-bind DNS resolutions #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinballard
Copy link

Change the internal host information from SocketAddress to an internal
HostPort class. Only resolve the HostPort into an InetSocketAddress right
before a connection (or reconnection) is made. This allows changes in DNS
mappings to be detected (e.g. when using AWS Elastic IPs).

Change the internal host information from SocketAddress to an internal
HostPort class. Only resolve the HostPort into an InetSocketAddress right
before a connection (or reconnection) is made. This allows changes in DNS
mappings to be detected (e.g. when using AWS Elastic IPs).
@kevinballard
Copy link
Author

This addresses Issue 245.

@daschl
Copy link
Collaborator

daschl commented Dec 9, 2014

Hi @kevinballard oh wow that is a large fix. Do you know if this late binding has performance impact?

@kevinballard
Copy link
Author

It looks like a large change, but the majority of it is just swapping one type for another.

The late binding does have a slight performance impact, but no more than it should for the desired behavior. The initial connection setup and any reconnections can cause a DNS lookup, if the JVM or the OS don't have it cached. With default configurations the JVM will cache DNS lookups for 30 seconds, and I believe that most OS'es will respect the TTLs on the DNS records themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants