1

Versions in question:

  • Centos 7
  • Curl 7.63.0 (x86_64-redhat-linux-gnu) libcurl/7.63.0 NSS/3.36 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.8.0 nghttp2/1.31.1

I've got some strange behaviour that I just cannot get to the bottom of. Requests using curl to https resources are significantly slower than those made by wget:

Curl: ``` [root@bb3af4933f48 app]# time curl --silent -o /dev/null https://www.google.com

real 0m0.253s user 0m0.060s sys 0m0.100s ```

Vs wget: ``` [root@bb3af4933f48 app]# time wget -o /dev/null https://www.google.com

real 0m0.098s user 0m0.000s sys 0m0.000s ```

After much googling I tried:

  • Upgrading curl from 7.29.0 to 7.63.0
  • Disabling IPV6 and enabling single-request in /etc/resolv.conf

But still, not getting anywhere at all.

Digging into the issue further shows that the slow down is nothing to do with DNS resolution, that can be ruled out, and is only applicable to HTTPS connections.

I've tried ensuring the same http protocol, and tls version for both requests but see the same behaviour.

We do not see this behaviour on macosx, or debian based machines.

  • On my system curl is faster than wget. But they are all well under one second, and even your timings don't reveal any significant problem. Are you actually having a problem caused by this? – Michael Hampton Dec 27 '18 at 16:15
  • Yes we have some applications which use libcurl which are experiencing latency issues when making many small calls. If I didn't have a problem, I wouldn't be asking the question 🤷 Regardless of the problem, I seek to understand the observations I've made, to learn. I'm happy for you that you don't observe the same behaviour on your system. – Stono Dec 27 '18 at 22:18
  • Hmm. Well. I did test on a system with global IPv6 connectivity. You might be having a problem with IPv4. In any case if disabling IPv6 or using single-request did not solve the problem, you should be sure to undo those, as they will likely cause you other problems in future. I'd also suggest trying via IPv6 if you already have IPv6 connectivity between you and the actual server you're trying to access. – Michael Hampton Dec 27 '18 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.