-
Notifications
You must be signed in to change notification settings - Fork 921
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
dnsdist: add multi-stream dnstap sockets #14861
Comments
The recursor opens a dnstap or protobuf logging stream per thread. Each thread logs to its associated socket. |
At the moment DNSdist creates one |
More notes on this: When we had >60kqps flowing through a single TCP session to Vector, I was seeing what I would describe as high fluctuations in bandwidth between the transmitting server and the Vector instance. Meaning: for a few milliseconds, there would be many (20? I don't recall the number) megabits of throughput, which would then drop for a few milliseconds to 5 megabits of throughput, and then jump back to 20. This was observed via packet dumps with tshark. Sorry that I don't have the exact figures here; I was hunting a different problem and that behavior was a "Huh... interesting." moment, but I did not document it. I suspect this is a behavior that is made worse by the single-socket model in use. The same packet dump looking at data coming from pdns-rec (with less than 60kqps, admittedly) was extremely smooth - there were no fluctuations in the packet throughput between Vector and the recursive resolver on the dnstap data stream. Is this the "fault" of dnsdist? Not necessarily, but the single-socket model may make things worse than they need to be. |
I am starting to work on this and my initial thought was to just add an additional option and open multiple connections inside of Not sure how to name it, but idea would be to manually build a number of loggers (or maybe provide a function that would do it based on a provided number parameter, or by number of available threads) and then just select a different one for each message. This would open up the possibility to easily providing different strategies, to achieve different goals, like passing same messages to all the different loggers or implementing the idea from this issue by selecting a different logger for each new message. Does an approach like this make sense @rgacogne @omoerbeek ? I wanted to check before I head into implementation. |
Short description
Adding multiple streams of dnstap data emitted from dnsdist would allow better scaling for dnstap consumers.
Usecase
We're using Vector to consume dnstap streams from dnsdist. There apparently are bottlenecks with single-socket models of dnstap data transmission. This I'm sure would be exacerbated by slower latency on the LAN and larger traffic volumes - the ACK traffic will start to cause pileups with a single socket. Spreading the data load out across many dnstap sockets like pdns-rec does would make sense. There is discussion of this here: vectordotdev/vector#20744 (see comment from james-stevens)
Description
Having dnsdist open multiple simultaneous dnstap sockets to any named endpoint would be useful. The number of sockets could be configurable, or it could be based on threading, or dynamic based on number of messages - no opinion on that. How does pdns-rec do it?
The text was updated successfully, but these errors were encountered: