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

proposal(plugin/dnstap): add configuration for filtering messages #6640

Open
mathetake opened this issue Apr 25, 2024 · 3 comments
Open

proposal(plugin/dnstap): add configuration for filtering messages #6640

mathetake opened this issue Apr 25, 2024 · 3 comments

Comments

@mathetake
Copy link
Contributor

mathetake commented Apr 25, 2024

What would you like to be added:

I would like to add a plugin option of dnstap to filter out certain messages.
Such configuration might be based on the message type of dnstap Message. But, it would be better for our usecase if there's a way to limit the messages to only the successful client responses (the one with RcodeSuccess) since we are only interested in the successful client responses. The latter can be complex and may result in a difficult API, so I am open to discuss the option API design here. I would appreciate it if anyone can enlighten me on the existing "filtering" API design if there's already such thing in another CoreDNS plugin.

Why is this needed:

Currently, dnstap plugin sends three message type:

  • FORWARDER_QUERY: is sent by forwarder plugin whenever dnstap plugin is enabled.
  • CLIENT_RESPONSE: is sent when the wrapped WriteMsg is called.
  • CLIENT_QUERY: is sent when Dnstap.Serve is called.

Even though the dnstap is designed to minimize the impacts on the query processing critical path, it would be better if there's a way to configure which message is supposed to get sent to dnstap upstream servers to minimize the unnecessary CPU/memory pressure on CoreDNS process.

I am happy to work on this by myself once approved.

@rdrozhdzh
Copy link
Contributor

This may be partially related to #4198

@mathetake
Copy link
Contributor Author

@rdrozhdzh thanks, that issue looks almost the same as this one. More importantly, I didn't know the fact that the similar configuration existed before. I will go ahead and open a PR soon, and will ping you there.

@mathetake
Copy link
Contributor Author

#6643

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

No branches or pull requests

2 participants