TTFB Too hight (1.2 sec on Cloudflare)


#21

I am having the same issue with my website www.halo.co.in. TTFB is low when CF is enabled. Any solution for this?

.


#22

Page speed is relative to the testing site location and target site location geographically. What are you using to test page load speed for those reported timings ?

With Cloudflare enabled, TTFB isn’t as important when you compare to first paint, first contentful and meaningful paint and document load times. As those are metrics Google is looking for https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics and where Cloudflare will help you optimise for when it’s enabled.

I’d check out webpagetest.org as they have alot of geographic test locations and allow you to test real mobile devices and different browser clients and connection speeds and test and reports those additional Google focused pagespeed metrics.

I wrote a guide for my users which maybe useful to you as well https://community.centminmod.com/threads/how-to-use-webpagetest-org-for-page-load-speed-testing.13859/


#23

I am using webpagetest with Cable connection and Chrome at Mumbai location. I also see that ping time is very low in Bangalore for Cloudflare.


#24

But where is your origin web hosting server located behind cloudflare ?

As TTFB speed is relative so if your origin web server is located further away from mumbia WPT test location then TTFB is higher. If you web host was in mumbia then expect TTFB to be much faster.

This is due to Cloudflare not caching HTML content by default (see below). So for optimal TTFB speed, you want your origin real web server to be hosted in a location closest to your majority traffic visitors and then put Cloudflare in front. For instance, my forums has 50% US visitors 40% Asian visitors and 10% Oceania. So my optimal geographic location for my origin is US West Coast as it sits in middle of US, Europe and Asian so equal round trip times for majority of visitors.

Cloudflare cache certain static content https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-CloudFlare-cache-for-static-content- but not dynamic/static generated html itself by default (which is what WPT TTFB is testing for). But you can tell Cloudflare to cache dynamic/static generated html content to some extent depending on Cloudflare plan you’re on via cache everything page rule but have to be careful to only do this for static html content and not dynamic html content (otherwise you would cache private logged in user content).


#25

Way too confusing. I am using sever from US, using page rule of caching everything and I have a railgun from my host.


#26

In that case with cache everything page rule + railgun, you should have faster speeds overall.

But WPT mumbia ec2 and WPT Virginia chrome cable tests both show you have cf cache miss so you don’t have page rule setup properly ?

Also cf-ray id shows mumbia EC2 WPT going through Cloudflare’s Singapore POP

You’re also using wordpress so be careful of cache everything page rule as it can cache logged in user content if not using CF business plan and bypass cache on cookies page rule.


#27

If using WP your better option is to use a caching plugin like Comet Cache. It’ll speed up wordpress nearly 10x. Then you can let CloudFlare not cache the html as normal.