Open
Description
Ice perform DNS lookups on a background thread to ensure that asynchronous calls don't block on hostname resolution. Lookups are serialized on this thread. Therefore, if a lookup takes time to return, it will delay other lookups. We should consider using multiple threads for the lookup or look into the recent APIs that provide non-blocking hostname resolution.
In C++:
- Linux: https://linux.die.net/man/3/getaddrinfo_a
- Windows: https://learn.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfoexa
- macOS: ?
Java doesn't appear to support yet an async API.
.NET has Dns.GetHostAddressesAsync
.
If no non-blocking API exists, we would have to consider a strategy to perform the lookups from multiple threads.