-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[NDMII-3058] Add synchronous rDNS lookup to rdnsquerier component #30002
Merged
Merged
Changes from 26 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
28291f0
Allow rdsquerier to run in snmp core check
vicweiss 6fdcbf4
Move Sync rDNS lookup to querier
vicweiss 14d6fd0
add release notes
vicweiss e33a05e
Add component for rdnsQuerierImplNone
vicweiss b186c38
Add component mock
vicweiss 96d868f
debug: add log line
vicweiss 44a9d29
Fix: SNMP CLI command, missing rdsquerier fx import
vicweiss 13be360
Add timeout the sync rDNS resolver
vicweiss 050bda0
Make it thread safe
vicweiss 03aeb57
Make the linters :)
vicweiss 8630743
fix race condition
vicweiss 0327484
Fix timeout, added tests
vicweiss 05da484
Remove debug logs
vicweiss 1638c35
Log errors
vicweiss 64ebedf
Merge branch 'main' into vic.weiss/snmp_rdns_enrichment
vicweiss d2f57ae
Linter fixes
vicweiss a456375
More linting
vicweiss d115431
Update releasenotes/notes/sndm-rdns-hostname-enrichment-1ca16478f8ebe…
vicweiss 0f734f1
rename GetHostname to GetHostnameAsync
ken-schneider b2c0cca
use channels instead of a lock
ken-schneider 4d29545
use table test for unit test
ken-schneider 5df33c0
Remove rDNS querier from SNMP core check (#30439)
vicweiss 4da5e29
add function for multiple IPs parallel
ken-schneider f9978d9
add tests for GetHostnames
ken-schneider 66e64d8
fix linter error
ken-schneider 6073f3f
update component definition, add mock
ken-schneider c69817b
udpate naming
ken-schneider 312a20c
add import to test
ken-schneider de28955
remove newline
ken-schneider 92fcea3
separate out single query logic
ken-schneider 2ebb1ae
add delay to test
ken-schneider a77b6c9
increase test delay
ken-schneider c704f60
fix race condition
ken-schneider File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocker, but I have the feeling that things could be simpler for a synchronous reverse DNS (with cache).
Maybe the need for chan/mutex/context timeout/callbacks is due to initial implementation being very async oriented (q.GetHostname(...)).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean is that, it seems that for a synchronous reverse DNS with cache, then basic logic could be something like:
with everything above being synchronous
But instead, we have much complex setup:
querierImpl.getHostnameAsync
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, maybe having a async underlying implementation can be beneficial for this: https://github.com/DataDog/datadog-agent/pull/30002/files#r1814405433
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've thought about that as well. I think there are some benefits to leveraging at least some of the whole workers paradigm.
Consider a large server with Network Traffic Paths enabled. A large number of workers is required to handle this load. With the first implementation described above, we're likely to make many more calls to the DNS server as the parallelism scales up. Depending on the traffic patterns we detect and the user's network topology, this might be more of a cold start problem than a continuous issue.
When @jmw51798, @vicweiss, and I discussed it getting all of that stuff to work with a synchronous implementation seemed like a large effort.