-
Notifications
You must be signed in to change notification settings - Fork 5k
Adding the option to disable the DNS processor failure or success cache #44932
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
base: main
Are you sure you want to change the base?
Conversation
This pull request doesn't have a |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
- QF1008, while I disagree with removing the additional qualification as it makes things more readable, removing the qualifier to appease the linter god.
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.
Can you please add to the proposed commit message to explain the why part and what is the use case for cache disablement.
beats/.github/PULL_REQUEST_TEMPLATE.md
Line 19 in c203b82
- WHY: the rationale/motivation for the changes |
Turning off the caching will significantly limit the throughput of the pipeline. Even if each request takes 1ms to complete, that means the maximum throughput is 1000 EPS.
Also, the documentation for the processor will need updated to include the new configuration parameter.
Added motivation.
|
- document Enabled settings - Notes with warnings on throughput and compounding effects
- document Enabled settings - Notes with warnings on throughput and compounding effects
Proposed commit message
Adds the option to disable the success and failure cache.
Motivation
This is to enable use cases that require capturing the current point in time dns record regardless of cache or ttl of the record. Such as the case of monitoring the dns server, or with recorded events that need to capture the current state of the environment. TTL captures the time frame over which the old value might be used over the current DNS record, in other words the frame time in which the agent might observe the old or new record based upon whenever the previous request was made. This unpredictability can be undesired when optimizing time-to-intervention.
Disabling the cache will have throughput implications, serial processing an event will be greater than DNS roundtrip time. For example if round-trip time to perform an DNS request is 1 ms, max throughput it limited to 1000/sec. Known use cases have are low throughput requirements. Parallelization, by for example deploying multiple agents, can be used to stretch this number. We would urge to reevaluate the use case and the use of the cache at this point.
NOTE: setting the ttl on the failure cache to 1ns achieves a similar, but imperfect effect.
NOTE: setting the ttl on the success cache is a valid option as per code, it is however ignored as also document in the code. in the documentation it is omitted as an option. Honoring setting and the ttl (min(ttl, dns_record_ttl)) is a different route. Similar to other dns client behaviour.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
non known, the default values leave the old behavior intact and the setting to trigger the new behavior is added in this PR
How to test this PR locally
Define the DNS processor, observe cache stats / resolver requests.
Related issues