curl-library
Fwd: Duplicate DNS Requests using cURL and C-ARES
Date: Thu, 27 Nov 2014 12:01:24 +0000
Hi All,
I'm working on an application which uses a combination of libcurl 7.36.0
and c-ares 1.10.1 (c-ares for async DSN lookup). The application is cross
compiled for various platforms but is closely POSIX like.
I'm using curl_easy_init & curl_easy_setopt to set up my curl handles.
Those handles are then processed using curl_multi but I'm also using
curl_share with CURL_LOCK_DATA_COOKIE and CURL_LOCK_DATA_SSL_SESSION.
What I'm finding is that when I make a few requests to various URLs on the
same domain multiple DNS requests are made for the same domain. Once the
first DNS response returned its cached I don't see any more requests for
that domain - as expected.
The problem is, if I make enough requests to the same domain before the
first DNS response returns, I can my client banned by the DNS server if I
make too many requests.
Is there any way to de-duplicate concurrent requests for the same DNS
address?
Cheers
Josh
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-27