Re: Regarding async DNS resolver
Date: Mon, 15 Jul 2019 04:36:09 +0530
Thanks Daniel !!
Will check it out in curl-library mailing list.
On Mon, Jul 15, 2019 at 4:20 AM Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Tue, 9 Jul 2019, Amit via curl-users wrote:
>
> (for questions about libcurl and using it, the curl-library mailing list
> is
> the better place)
>
> > implementation which wakes up every 1 second and requests CURL to check
> all
> > the ongoing requests (I.e. by calling curl_multi_perform()). So even if
> DNS
> > was resolved within 100 msec, request will only be sent out after 1
> second
> > (I.e. with delay of 900 msec).
>
> That sounds like a rather naive way to work with libcurl and will of
> course
> cause such performance problems.
>
> > I would like to seek your opinion/thoughts if it is good idea to
> implement
> > a callback to notify the clients about DNS resolution ?. Also, let me
> know
> > if there is any other available mechanism to achieve the same
> functionality.
>
> if libcurl offers no socket to wait for, you should wait *a short while*
> and
> then check again. (The curl_multi_fdset man page suggests 100
> milliseconds,
> but that too will be a performance loss if it resolves the host name in 2
> milliseconds...)
>
> Current libcurl versions make sure curl_multi_timeout() returns a suitable
> timeout even in that situation (and will make it slowly increase if no
> activity is detected over time).
>
> --
>
> / daniel.haxx.se | Get the best commercial curl support there is - from
> me
> | Private help, bug fixes, support, ports, new features
> | https://www.wolfssl.com/contact/
>
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-07-15