Skip to content

.tip

· one of the small things

curl -w prints where the time went

A slow request is some mix of DNS, connect, TLS, server think time and transfer, and -w breaks it down.

curl -o /dev/null -s -w 'dns %{time_namelookup} connect %{time_connect} tls %{time_appconnect} ttfb %{time_starttransfer} total %{time_total}\n' https://example.com/api

If ttfb is most of the total, it's the server. If tls is, it's the handshake, and keep-alive would help.

shellhttp