Closed guruofquality closed 10 years ago
Most likely, the DNS timeout is not configurable. The code that performs the lookup should spawn an async future to resolve the host. If the future does not complete within the timeout, the host is considered offline.
Documentation for Poco DNS resolver: http://pocoproject.org/docs/Poco.Net.DNS.html The Poco DNS resolver has an internal cache, but seems to suffer from long timeouts. Therefore, we would probably need to async future a call to Poco::Net::DNS::resolveOne()...
Where to call into the cache: https://github.com/pothosware/pothos-library/blob/master/lib/Remote/Client.cpp#L64
Update: Poco::Net::SocketAddress also performs the DNS resolution, but handles IPv4 vs IPv6. Replace Poco::Net::DNS::resolveOne() with SocketAddress for resolution.
DNS timeouts can make the interface sluggish. We should determine the result of a lookup and cache it to avoid nasty timeouts in the face of failure.
The RemoteClient interface relies on the timeout parameter to be obeyed. This is not correct when the lookup times out.