On Wed, 7 Dec 2022, Dmitry Karpov via curl-library wrote:

Exactly! Honoring exact TTLs will be a very good feature. I heard complaints from some backend services who manipulated DNS records for load balancing and used 20s TTL that libcurl didn't honor it and it created performance issues. So, it will be definitely a good addition to the library.

Sure, just a little complicated.

A primary reason the default name resolving in libcurl is still done with getaddrinfo() and not with a third party library like c-ares is that it is mighty hard to replicate its functionality. And getaddrinfo() does not return TTL.

If we want to know the TTL for A and AAAA records while remaining 100% compatible with names used all over, we need to use getaddrinfo() *AND* do a separate lookup for the A and AAAA entries and use any possible TTL values we get back. Double the number of DNS requests. Not ideal.

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
--
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to