-
Notifications
You must be signed in to change notification settings - Fork 2.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
plugin/timeouts - Allow ability to configure listening server timeouts #5784
Conversation
Signed-off-by: Rich <git0@bitservices.io>
99c30bb
to
1fc3a69
Compare
Signed-off-by: Rich <git0@bitservices.io>
Signed-off-by: Rich <git0@bitservices.io>
Signed-off-by: Rich <git0@bitservices.io>
I think this is as far as I can take this PR. Any guidance in making it good enough for merge would be appreciated. I am not 100% familiar with everything that's going on in CoreDNS and this is my first attempt at Go so only happy to take criticism/suggestions. |
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.
Hello, thanks for your contribution! Although I have some objections regarding plugin configuration, please consider adjusting how the plugin will be configured
Signed-off-by: Rich <git0@bitservices.io>
Changes submitted for how the plugin should be configured |
Signed-off-by: Rich <git0@bitservices.io>
46f5673
to
8bb15da
Compare
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.
overall looks good to me, I would just make few quality improvements 👍
Codecov Report
@@ Coverage Diff @@
## master #5784 +/- ##
==========================================
+ Coverage 55.70% 57.28% +1.58%
==========================================
Files 224 245 +21
Lines 10016 15731 +5715
==========================================
+ Hits 5579 9011 +3432
- Misses 3978 6173 +2195
- Partials 459 547 +88
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks @Tantalor93 I will try and get on these improvements when I get a moment |
Signed-off-by: Rich <git0@bitservices.io>
Signed-off-by: Rich <git0@bitservices.io>
Signed-off-by: Rich <git0@bitservices.io>
Hopefully that should cover the comments unless I've messed something up (i've ran go tests/etc locally so hopefully not!) |
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.
LGTM, thanks for your contribution!
1. Why is this pull request needed and what does it do?
Creates a "timeouts" plugin for configuring the listening server timeouts. Applies to TCP, DNS-over-TLS, DNS-over-HTTPS.
CoreDNS currently has a hard-coded 2 second read timeout for TCP/TLS connections and 5 seconds for HTTPS. This appears to be optimised for local network and/or Kubernetes environments where CoreDNS is most often used. Where CoreDNS is acting as a resolver on the public Internet this 2 second timeout can cause problems particularly on 3G/4G/5G connections where there might be lag.
It also removes the limit of queries per connection since we are enforcing timeouts this makes no sense and can cause some devices to think the DNS server is faulty.
It also removes the 128 requests per connection limit.
Corefile
is also added to.gitignore
for easier testing. Happy to revert this if preferred.See more details in below.
2. Which issues (if any) are related?
#5780
3. Which documentation changes (if any) need to be made?
Plugin documentation - included.
4. Does this introduce a backward incompatible change or deprecation?
The only possible issue would be clients that expect the server to close the connection after 128 requests which feels very unlikely.