-
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 pooling support for RemoteLoggerInterface
#15123
base: master
Are you sure you want to change the base?
Conversation
There is a lot of noise in |
Can you split this work in two commits, one with most of the formatting/whitespace changes and another with the actual work? This would indeed help reviewing. |
This adds a new kind of `RemoteLoggerInterface`: `RemoteLoggerPool`. It can take multiple other `RemoteLoggerInterface`s and pass data to them in round-robin order by default. This also adds additional option to `newRemoteLogger`, `newFrameStreamTcpLogger` and `newFrameStreamUnixLogger`: `connectionCount`, which can be used to generate a pool with multiple connections. Closes: PowerDNS#14861
Co-authored-by: Miod Vallat <[email protected]>
01d1012
to
95fb88b
Compare
Pull Request Test Coverage Report for Build 13174750599Details
💛 - Coveralls |
Co-authored-by: Miod Vallat <[email protected]>
Can't comment about the usefulness, but the code reads ok. Can you update the meson rules so that the CI gets a chance to pass? |
Thank you. I went for a very simple approach for now. There was a discussion of different strategies (for picking the interface(s) to pass data to), but I think these are easy to add onto this, since it really just forwards data to one of the interfaces. |
This also fixes a bug with loggers in YAML, which had hardcoded connection status. For `RemoteLogger` that worked by having it always connect, but for `FrameStreamLogger` it never connected. Now the behavior is the same as lua, by checking the client mode flag.
There was not option of having no alter function defined, even though it is expected by config. If it wasn't defined, it passed an invalid alter function into the action. This makes the alter function optional and properly checks if it was found in configuration.
One concern, though, is that |
You are right. I have overlooked that. I can see that |
Also, I was wondering if I should change the implementation of The alternative would be to just show number of loggers and stats, but then that would hide the addresses. This also brings me to the |
Short description
This adds a new kind of
RemoteLoggerInterface
:RemoteLoggerPool
. It can take multiple otherRemoteLoggerInterface
s and pass data to them in round-robin order by default.This also adds additional option to
newRemoteLogger
,newFrameStreamTcpLogger
andnewFrameStreamUnixLogger
:connectionCount
, which can be used to generate a pool with multiple connections.Closes: #14861
Checklist
I have: