I’ve migrated my blog to Netlify with a custom domain and I’ve found some weird behaviors.
I’ve a really slow time to first byte when using cURL with the custom domain. It’s working well with the domain *.netlify.com. I’ve hardcoded the IP (with the /etc/hosts file) to use the same server for both requests (184.108.40.206).
With the Netlify domain (aerialls.netlify.com with request ID b44bd1e7-9aa5-4653-8bda-a34ddf2d06fc-3994746)
time_connect: 0.016061 time_appconnect: 0.036165 time_pretransfer: 0.036583 time_redirect: 0.000000 time_starttransfer: 0.047494 -------- time_total: 0.047690
All good. But with my custom domain (www.aerialls.io with request ID b44bd1e7-9aa5-4653-8bda-a34ddf2d06fc-4043648)
time_connect: 0.017006 time_appconnect: 0.041514 time_pretransfer: 0.043533 time_redirect: 0.000000 time_starttransfer: 6.255878 -------- time_total: 6.256035
If I’m accepting GZIP encoding (
Accept-Encoding: deflate, gzip), the TTFB is much better with both domains but I still can see a x5 factor between the two times (0.310832 for my domain vs 0.055943 for netlify).
The server is the same for both requests. I can’t explain why the TTFB is so much higher in this situation. I’m doing a simple cURL request without any extra parameter.