DNS resolves quickly, but "Waiting for server response" is 6 seconds on initial load, is this normal or a sign of a misconfiguration from DNS?

Sorry in advance for not supplying a domain / URL, I don’t have permission to do that at the moment

I’m taking a quick look at a site I’m not familiar with that is taking 6 seconds for the initial load. I’ve looked through support threads here and see that DNS resolution is often an issue, but in this case from what i can tell DNS is resolved quickly, and I can reproduce the issue directly using the .netlify.app URL. “Waiting for server response” takes around 6 seconds.

Note that this only happens on the initial load after some time (feels like around 15 minutes but not 100% sure), after this it feels like something is “cached” and the server response time is very fast / normal. I fully admit to not understanding the understanding mechanisms at play, but the “cache” seems to be somewhere on the Netlify side (or a lower level system / Mac / router / ??? cache), which I say because running curl from the terminal (no browser cache!) and seeing this response info on the initial request.

     time_namelookup:  0.308699s
        time_connect:  0.388224s
     time_appconnect:  0.480198s
    time_pretransfer:  0.480272s
       time_redirect:  0.000000s
  time_starttransfer:  6.910414s
          time_total:  7.211094s

And then

     time_namelookup:  0.055420s
        time_connect:  0.140462s
     time_appconnect:  0.234247s
    time_pretransfer:  0.234497s
       time_redirect:  0.000000s
  time_starttransfer:  1.288786s
          time_total:  1.620710s

after subsequent requests.

Note this also seems to happen when I directly hit the Netlify URL, e.g. https://thedomain-account.netlify.app - so

curl -w "@curl-format.txt" -o /dev/null -s "https://thedomain-account.netlify.app/"

     time_namelookup:  0.045020s
        time_connect:  0.130401s
     time_appconnect:  0.224396s
    time_pretransfer:  0.224541s
       time_redirect:  0.000000s
  time_starttransfer:  6.111111s
          time_total:  6.504813s

This feels like a “cold start” in the Lambda world, but as I understand it the site is statically generated so I’m not sure what could cause this.

Any tips or advice as to what I could do to diagnose this issue? Or is this expected behavior with Netlify on initial requests (in particular for lower / free tiers)?

Thank you!

6 seconds is not expected on any tiers. But as you can imagine, we can’t go ahead without any site or asset URL. If this is a static page as you suggest, there’s nothing for you to debug from your end, but for us to check/verify if we’re indeed seeing those high timings and do something about it.

This is fair. I have been given permission, here is the Netlify url: https://encoord-atama.netlify.app/

Any info you can see on your side? Thank you!

edit: again just to reiterate, this only happens on (what feels like) a “cold start” - after the initial load, the page is perfectly responsive.

That URL is a Next.js SSR route and not statically generated. What you are seeing is almost certainly the cold-start time.