curl-library
Re: Choosing between CURL multi vs easy interface
Date: Mon, 6 Jul 2015 11:16:15 +0200 (CEST)
On Sun, 5 Jul 2015, Rajalakshmi Iyer wrote:
> As it stands, when the third-party HTTP server is behaving erratically, my
> applications faces issues like timeouts and errors in resolving host name,
This doesn't really add up. Even if you have problems with the HTTP server, it
should not cause any name resolve problems since your DNS server or local
resolver is very rarely the same machine as the HTTP server.
> - From intermittent errors related to host name resolution, it appears
> that a DNS lookup is being done frequently for the same third-party HTTP
> server. Is there a way to cache the DNS lookup?
libcurl caches DNS lookups by default. You can change the timeout.
Your resolver also caches names so even after libcurl's DNS cache timeouts,
the other resolves can still be very fast.
As Yehezkel Horowitz points out, you can also share the DNS cache between easy
handles.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2015-07-06