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
Skip unnecessary DNS resolution when creating AuthenticationDataHttp instance #15221
Skip unnecessary DNS resolution when creating AuthenticationDataHttp instance #15221
Conversation
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
…tp instance - improves solution added in apache#15221 - It's better to use the JDK provided InetSocketAddress.createUnresolved method to prevent unnecessary DNS resolution
I created a follow up PR #15228 since in this case, the use of |
…instance (apache#15221) (cherry picked from commit 14991c9)
…tp instance (apache#15228) - improves solution added in apache#15221 - It's better to use the JDK provided InetSocketAddress.createUnresolved method to prevent unnecessary DNS resolution (cherry picked from commit e71b98a)
…instance (apache#15221) (cherry picked from commit 14991c9)
…tp instance (apache#15228) - improves solution added in apache#15221 - It's better to use the JDK provided InetSocketAddress.createUnresolved method to prevent unnecessary DNS resolution (cherry picked from commit e71b98a)
…instance (apache#15221) (cherry picked from commit 14991c9)
…tp instance (apache#15228) - improves solution added in apache#15221 - It's better to use the JDK provided InetSocketAddress.createUnresolved method to prevent unnecessary DNS resolution (cherry picked from commit e71b98a)
@lhotari This and the follow up commits are labelled with 2.10 but I don't see the related changes on branch-2.10 https://github.com/apache/pulsar/blob/branch-2.10/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java |
…instance (apache#15221) (cherry picked from commit 14991c9)
…tp instance (apache#15228) - improves solution added in apache#15221 - It's better to use the JDK provided InetSocketAddress.createUnresolved method to prevent unnecessary DNS resolution (cherry picked from commit e71b98a)
Motivation
Using the DNS resolution is a blocking operation in Java. In this case it's completely unnecessary to do a reverse lookup for the client's IP address.
Modifications