ice icon indicating copy to clipboard operation
ice copied to clipboard

Non-serialized DNS lookups

Open bentoi opened this issue 2 years ago • 0 comments

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.

bentoi avatar Sep 06 '23 10:09 bentoi