Meaningless Drivel is fun!*
The moose likes Sockets and Internet Protocols and the fly likes sloowwwww  Reverse DNS lookup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "sloowwwww  Reverse DNS lookup" Watch "sloowwwww  Reverse DNS lookup" New topic
Author

sloowwwww Reverse DNS lookup

Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Here is my simple code:


I understand that there is no guarantee that this will return a proper host name. For some ip addresses, this takes a ridiculously long time to return, often with just the same ip address I put in. Other ip addresses are faster. Meanwhile, netstat from the command line returns all IP addresses instantly.

So I have three questions:
1) InetAddress API says that it uses a "System Configured lookup setting" to resolve the ip address to a host name. what settting would this be?
2) Why do some ip addresses take longer than others?
3) How does netstat get this same information so much faster?

I am loking through the SIGAR code for their netstat implementation and it just uses something similar to what I put above.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sloowwwww Reverse DNS lookup
 
Similar Threads
Using ip address in place of localhost
RMI Binding on localhost
inetaddress dns?
is RMI this slow????
Why does RMI naming lookup work on the local host when I give it a garbage name?