Hello Daniel and libcurlers,

during our development, a couple of questions popped up concerning DNS
changes. We're trying to understand if this is an unusual scenario and how
best to handle the situation with libcurl/c-ares combination, so this is
mainly an advice request.

Scenario: we're a long-running application that opens a lot of connections,
creating a pool of easy_handles and recycling them (first time creating
them with curl_easy_init(), and resetting them for re-use with
curl_easy_reset()). HTTP communication is in a single thread, so also one
multi handle for it.

Q1: What's the best way of handling non-standard resolve.conf paths?
We have the option of passing the list of DNSs with CURLOPT_DNS_SERVERS(),
but the issue is that we need to react to DNS changes. This comes "for
free" if you're using the default resolve.conf because it gets re-read on
easy_init(), but not with none-standard paths. Hence the next question:

Q2: What's the best way of handling changes to none-standard resolve.conf
with easy_handle recycling?
The recycled handles won't call the curl_easy_init() and won't get the
resolve.conf changes. Is there a way to "refresh" just the DNS settings
(force resolve.conf re-read somehow?) without re-creating the easy_handles?

Thank you in advance & all the best,
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to