Non-blocking (async) DNS resolving in Java
问题 Is there a clean way to resolve a DNS query (get IP by hostname) in Java asynchronously, in non-blocking way (i.e. state machine, not 1 query = 1 thread - I'd like to run tens of thousands queries simultaneously, but not run tens of thousands of threads)? What I've found so far: Standard InetAddress.getByName() implementation is blocking and looks like standard Java libraries lack any non-blocking implementations. Resolving DNS in bulk question discusses similar problem, but the only solution