[
https://issues.apache.org/jira/browse/TINKERPOP-2740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17550553#comment-17550553
]
ASF GitHub Bot commented on TINKERPOP-2740:
-------------------------------------------
vkagamlyk opened a new pull request, #1683:
URL: https://github.com/apache/tinkerpop/pull/1683
Replaced getCanonicalHostName() with getHostName() to to get rid of slow
reverse DNS lookup
> first request suspend more than 9s when using gremlin-java-driver
> -----------------------------------------------------------------
>
> Key: TINKERPOP-2740
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2740
> Project: TinkerPop
> Issue Type: Improvement
> Components: driver
> Affects Versions: 3.4.3, 3.6.0
> Reporter: Stark Arya
> Priority: Critical
>
> when user use gremlin-driver in private cloud environment,
> In AUTHENTICATE rsp func, client need reverse name lookup through DNS, which
> will take more than 9s in certain env; the calling code slice:
>
> {code:java}
> Handler.GremlinSaslAuthenticationHandler.channelRead0
> saslClient.set(this.saslClient(this.getHostName(channelHandlerContext)));
>
> private String getHostName(final ChannelHandlerContext channelHandlerContext)
> {
> return((InetSocketAddress)channelHandlerContext.channel().remoteAddress()).getAddress().getCanonicalHostName();
> }
> {code}
> there are many talks about this talks about this question.
> [https://www.thecodingforums.com/threads/very-slow-ssl-connection-from-win-to-linux.147274/#post-2959030]
> [https://stackoverflow.com/questions/3193936/how-to-disable-javas-ssl-reverse-dns-lookup]
>
> I think we can rewrite the getHostName like this(use getHostAddress):
> {code:java}
> private String getHostName(final ChannelHandlerContext channelHandlerContext)
> {
> return
> ((InetSocketAddress)channelHandlerContext.channel().remoteAddress()).getAddress().getHostAddress();
> } {code}
> all versions seed affected
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)