Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2740

first request suspend more than 9s when using gremlin-java-driver

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.4.3, 3.6.0, 3.5.3
    • 3.6.1, 3.5.4
    • driver
    • None

    Description

      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:

       

      Handler.GremlinSaslAuthenticationHandler.channelRead0       
       saslClient.set(this.saslClient(this.getHostName(channelHandlerContext)));
        
      private String getHostName(final ChannelHandlerContext channelHandlerContext) {
      return((InetSocketAddress)channelHandlerContext.channel().remoteAddress()).getAddress().getCanonicalHostName();
      }
      

      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):

      private String getHostName(final ChannelHandlerContext channelHandlerContext)  {
          return ((InetSocketAddress)channelHandlerContext.channel().remoteAddress()).getAddress().getHostAddress();
      } 

      all versions seed affected

       

      Attachments

        Activity

          People

            lyndonb Lyndon Bauto
            Stark Arya Stark Arya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: