How Can I Lower TTFB?

We have made many page speed improvements on our site. The reason for switching to CDN technology was to want our page to open faster.

Time to First Byte (TTFB) takes a very long time, around 2.2 seconds. Am I making a mistake somewhere in the Cloudflare settings? What should I do to lower TTFB values? I switched to CDN but it didn’t work.

Please check:

Hey there

Since Cloudflare acts as a reverse proxy, we might affect the TTFB for a site. There are a few HTTP requests that add up to the total TTFB:

  1. Cloudflare successfully negotiating a connection with your origin.
  2. Cloudflare sending a request on the connection.
  3. The origin generating a response.
  4. Cloudflare receiving the response.

Essentially, you may see a larger TTFB because we don’t send data back until after we have connected to your web server and it has responded.
The difference is usually no more than a few milliseconds, but more details on Cloudflare and TTFB can be found here:
Are you measuring what matters? A fresh look at Time To First Byte

You can use Cloudflare Observatory to run tests and check the real user monitoring (RUM) data.
This page can help you understand the results of the tests.

If you’re seeing the TTFB is unusually high on dynamic resources (CF-Cache-Status is not HIT, see Cloudflare cache responses):

  1. Follow the customize the cache guide to make sure that any resource that can be cached appropriately is cached. You can review the Cache Analytics on the Cloudflare Dashboard to check for cache performance and potential improvements.
  2. Make sure your origin web server is performing well: you might need to check with your website administrator or hosting provider.
1 Like