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

DNS resolution perma-cached #36

Open
SpencerMalone opened this issue Sep 23, 2019 · 0 comments
Open

DNS resolution perma-cached #36

SpencerMalone opened this issue Sep 23, 2019 · 0 comments

Comments

@SpencerMalone
Copy link

The recent(ish) release of https://github.com/logstash-plugins/logstash-output-statsd to 3.2.0 used the latest release of https://github.com/reinh/statsd/blob/master/lib/statsd.rb, which changed the socket logic to reuse a single socket until error (https://github.com/reinh/statsd/blob/master/lib/statsd.rb#L438). This works fine for TCP, but for UDP if a host name changes (like it might in a k8s-like environment), we will never refresh the socket and start losing stats. I'm sort of assuming the upstream won't get fixed based on the issues that exist in their github (calls for a maintainer, etc.)

I confirmed this by testing SpencerMalone@5130f96 1, but am unsure of how to proceed for an upstream fix. My current solution is hacky at best. I don't really recall ruby's concurrency semantics, is it a whole new process? Can we call connect from a child thread created in the register function? Anyone have opinions on how to best approach this?

This is a copy of the issue @ https://discuss.elastic.co/t/logstash-statsd-plugin-caches-dns-resolutions-when-using-udp-forever/170413, which was created as recommended by https://github.com/logstash-plugins/logstash-output-statsd/blob/master/.github/ISSUE_TEMPLATE.md, but there was no interaction and the thread was closed.

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

No branches or pull requests

1 participant