curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

libcurl appconnect_time is greater than starttransfer when using HTTPS proxy

From: Yongkang Huang via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 10 Jun 2021 02:36:11 +0000

Hi!

Iā€™m trying to break down the latency when connect through HTTPS proxy. One interesting found is the appconnect_time is greater than time_starttransfer:

curl -p -x https://[myproxy] -v --trace-time -s -w_at_curl-format.txt -o /dev/null https://www.google.com

    time_namelookup: 0.000108
       time_connect: 0.199598
    time_appconnect: 0.443684
   time_pretransfer: 0.233842
time_starttransfer: 0.273798
                    ----------
         time_total: 0.276055

However if I do without proxy:

curl -s -w_at_curl-format.txt -o /dev/null https://www.google.com
    time_namelookup: 0.032343
       time_connect: 0.062947
    time_appconnect: 0.147833
   time_pretransfer: 0.148032
time_starttransfer: 0.226086
                    ----------
         time_total: 0.235938

curl-format.txt has the following content:

    time_namelookup: %{time_namelookup}\n
       time_connect: %{time_connect}\n
    time_appconnect: %{time_appconnect}\n
   time_pretransfer: %{time_pretransfer}\n
time_starttransfer: %{time_starttransfer}\n
                    ----------\n
         time_total: %{time_total}\n\n

My understanding is time_appconnect represent the time from start until SSL ended with destination server, time_starttransfer means the time when the first byte from destination received, how would libcurl stamp the time when apply HTTPS proxy to cause the app_connect greater than time_starttransfer? Does all the time except time_appconnect profile the time connect to proxy instead of destination?

Thanks in Advance šŸ˜Š

Best,
Yongkang Huang

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-06-10