Hi Daniel, Correct me if I am wrong. Using --enable-ares=<ares installation path> should help to achieve timeout < 1000.
Also if there is any documentation on installing c-ares and building libcurl with c-ares, please share here. Thanks and regards Karthikeyan T S. On Sat, 16 Nov 2019, 16:53 karthikeyan Sivakkumar, <[email protected]> wrote: > Hi Daniel, > > Thanks for the clarification. Apologies for missing out to answer your > backend resolver query. Libcurl build is actually done by our application > product and I donot have the info with me. > > Will check with them. > > I did check your blog on libcurls-name-resolving and got some info about > the c-ares and threaded solutions for asynchronous name resolving. > > Looking at curl docs, I learnt about the - - disable-ares option to > disable C-ARES support thereby reducing libcurl size. I can check with my > product team if this option was used in our libcurl build. > > Kindly guide me if this would help. Also, if there is anyother way to > enable the async/threaded resolving, kindly let me know the same too. > > > Thanks and regards, > Karthikeyan T S. > > On Fri, 15 Nov 2019, 19:24 Daniel Stenberg, <[email protected]> wrote: > >> >> > Cases 1, 2 and 3 work fine but timeout occurs wrongly in cases 4 and 5. >> > Please correct me if my understanding here is wrong. >> >> Didn't this change the behavior? Your original statement said sub second >> timeouts still took a full second but in this output it looks like they >> failed >> completely. >> >> You also never answered my question about what resolver backend your >> build is >> using but I think that the above behavior answers it for me with enough >> certainty: >> >> I think libcurl returns an error for you due to this condition: >> >> >> https://github.com/curl/curl/blob/c6b70de24660673648a37be4d18638274d7f5741/lib/hostip.c#L662-L669 >> >> ... this is because you've built libcurl to use the synchronous name >> resolver >> and we can only time-out that with signal() and that function only has >> integer >> second resolution. If you ask for a shorter timeout, that can't be >> fullfilled. >> >> libcurl defaults to using the threaded resolver these days which will >> fire up >> the resolver in a sepearate thread that can be abandonded easier and in >> less >> than a second. >> >> -- >> >> / 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-library Etiquette: https://curl.haxx.se/mail/etiquette.html
