We are using ares_gethostbyname to resolve host names to IP addresses and it works fine. Recently, we want to use record TTL to set DNS query interval in our client side. It looks like there are several options: ares_query, ares_search. We can use ares_parse_a_reply to get the TTL information from the DNS query response.
But when using ares_query and ares_search, some optimizations in ares_gethostbyname are lost. For example, fake_hostent check.
Does the community consider adding TTL in ares_gethostbyname callback or adding a new API?
We are using
ares_gethostbynameto resolve host names to IP addresses and it works fine. Recently, we want to use record TTL to set DNS query interval in our client side. It looks like there are several options:ares_query,ares_search. We can useares_parse_a_replyto get the TTL information from the DNS query response.But when using
ares_queryandares_search, some optimizations inares_gethostbynameare lost. For example,fake_hostentcheck.Does the community consider adding TTL in
ares_gethostbynamecallback or adding a new API?