Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-7758

Site-to-Site and ListenTCP unnecessarily perform Reverse DNS Lookup

    XMLWordPrintableJSON

Details

    Description

      The SSLSocketChannel class in nifi-security-utils obtains the remote address's hostname via a call to InetAddress.getHostName():

      final Socket socket = socketChannel.socket();
      this.hostname = socket.getInetAddress().getHostName();
      

      This hostname is captured only for use in the message of Exceptions or logging and not programmatically. The use of this reverse DNS lookup, though, can be expensive and cause long delays in an environment where reverse DNS lookups are not available. As a result, we should use InetAddress.toString() instead, which will provide the hostname, if it is available, and the IP address without performing a reverse DNS lookup.

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m