-
Notifications
You must be signed in to change notification settings - Fork 996
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
Use Netty's asynchronous DNS resolver #1498
Comments
Hi @mp911de, |
Thanks for bringing this issue up. We're happy to receive a pull request to use netty's asynchronous DNS resolver. |
We now use netty's non-blocking DNS resolver upon connect.
We now use netty's AddressResolverGroup and configure DnsResolverGroup if netty-dns-resolver is on the classpath. Original pull request: #1517.
Bug Report
According to the motivation of #498, netty's non-blocking DNS resolver should be used.
However netty's blocking DNS resolver seems to be used now.
netty's release note suggests if we want to use async DNS resolver we need to pass
resolver
toBootstrap
; they sayBy default it will use the JDK name resolution, just as before, which is blocking
.The modifications of commit 3c8d021 and cf71131 is to simply delegate netty's DNS resolution, which seems insufficient to use async DNS resolver.
Maybe due to this behaviour I observe lettuce' epoll event loop is blocked during topology refresh (with dynamicRefreshSources=false) when DNS lookup is heavily loaded.
thread dump:
Current Behavior
netty's blocking DNS resolver(DefaultNameResolver) seems to be used.
Input Code
Expected behavior/code
netty's non-blocking DNS resolver(DnsNameResolver) should be used.
Environment
Possible Solution
yueki1993@be7a99a
Additional context
To check this behaviour debugging a test with intellij would be the simplest.
Debug run
AtLeastOnceTest#connectionIsConnectedAfterConnect
with breakpoints at:and you should see
DefaultNameResolver
is used.The text was updated successfully, but these errors were encountered: