I asked this on networkengineering.se, and they suggested I move it here.
I tried to test the speed of my website, so I used
time curl "http://google.com"
The result ended with
real 0m15.589s
user 0m0.012s
sys 0m0.000s
I tried to see what took so long, so I timed hosts time host google.com
and got
real 0m0.180s
user 0m0.008s
sys 0m0.004s
And time curl "http://216.58.217.206"
and got
real 0m0.163s
user 0m0.000s
sys 0m0.004s
0.18 s + 0.16 s (time to lookup DNS and downloading data) is much less than 15.58s!!
Why does curl take so long?
I ran these commands these a few times in a row, so caching isn't the issue