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

try to add a better localhost resolver. See issue #44 #1

Closed
wants to merge 2 commits into from

Conversation

lassic
Copy link

@lassic lassic commented Jan 1, 2015

A "Smarter" localhost resolver:

see issue riemann#44
Trying to avoid a lot of calls to java.net.InetAddress.getLocalHost()
which under AWS seem to trigger DNS resolving and have non-zero (~10ms) latency per event.
Usually, the hostname doesn't change so often to warrant a real query.

A real call to java.net.InetAddress.getLocalHost().getHostName()
is made only if:

  1. the refresh interval has passed (=result is stale)
    AND
  2. no env vars that identify the hostname are found

@@ -6,23 +6,25 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these changes related to this feature?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not, possibly new intellij version did this when importing the maven project.
otherwise it wouldn't recognize imports etc.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. so please consider reverting these file changes

@lassic
Copy link
Author

lassic commented Jan 15, 2015

@itaifrenkel I hope I didn't forget anything, thanks.

@lassic
Copy link
Author

lassic commented Jan 15, 2015

Opening new PR for submission.

@lassic lassic closed this Jan 15, 2015
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