TTFB Speed

#1

Hello why my TTFB on my sites is so high? The average is 600-700.
Google recommends this value to be less than 200.

#2

It’s probably because your server takes a long time to generate the page HTML. What’s the URL?

#3

Which server is responsible for creating Html when i using Cloudflare, hosting server or Cloudflare server?

#4

Your server generates the HTML. Cloudflare does not cache HTML by default, so it has to get it from your own server each time.

#5

The TTFB is how long your server takes to process a request and send the first bit of data back to the user’s browser. There’s multiple factors relating to how long this could take - but this has very little to do with Cloudflare themselves.

High response rates depend on two things;

  1. If you have a lot of server-side operations being done this can be quite high. Certain operations, like creating cached style sheets, running queries, checking the IP addresses of all the visitors, logging actions, it takes up time to process. This is usually the case with many large CMS-powered systems that are powered by PHP - but it can also happen with ASP.

  2. If you have insufficient hardware resources to process the tasks fast enough - it might be worth upgrading. Usually shared hosting environments will effect this. As will poor cache-control.

Factcheck: Google in fact a few days back reduced the TTFB to 100ms, down from 200ms.

Edit: Cloudflare can help slightly by having faster DNS look up rates. The initial look up can vary and with SSL encryption, this is usually increased marginally beyond non-SSL websites. Strangely, when you have a domain hosted elsewhere, I’ve experienced lower DNS look up times as opposed to having Cloudflare as my registrar. Why that is, I don’t know just yet!

1 Like
closed #6

This topic was automatically closed after 31 days. New replies are no longer allowed.