TTFB simply means the time it takes the server to prepare the requested information by a website user and respond back. If TTFB takes longer, then most definitely, it will take long too to respond to a website visitor; hence, result to longer webpage loading time.
Here is the case of a website that I have on a VPS plan. When I’m not using Cloudflare on the webiste, the TTFB is approximately 250-300ms. The page load time takes around 1.5 seconds.
However, when I link the website with Cloudflare, the TTFB more than doubles to stand at approximately 600-750ms. The website load time takes around 2.0 seconds to load. Clearly, that shows TTFB matters and Cloudflare should take it seriously unless the free plan is designed to behave that way.
Since the second ping (that will use the kept-alive connection, so the pure RTT between your device and Cloudflare) is pretty low, the connectivity between CF and you is pretty good. The only issue that could be causing it is maybe either
A. Your server doing something different when it receives Cloudflare headers (unlikely) or otherwise does something else when CF is being a proxy for the visitor.
B. the routing between your hosting and Cloudflare is bad
In the case of B, Where is your hosting located, and if you’re comfortable saying it, what is your hosting provider? And if you have SSH access to your server, the output of tracert 104.18.38.191 would also be useful.
Is this via a website speed test service, or your local machine?
If you can’t access the command-line of your hosting machine, a traceroute isn’t really possible. Your hosting control panel might give instruction for SSH’ing into your server, in which case you run traceroute 104.18.38.191.
Since the routing is fine (4 ms to Cloudflare) it’s likely something with the web server doing something different when CF is requesting the page instead of a regular visitor. It’s hard to pinpoint what would be taking longer, but maybe benchmark your server with an APM solution or, if it’s wordpress, a “plugin profiler” like P3.
Hello I hope you don’t mind me adding on here, I wanted to say thankyou for the great tool and link :} it has helped me assess why (I think) load times vary so much on our new site under development on sydney servers.
for those reading this later, just use yourdomain.com no https:// and cut and paste yourdomain.com (as in yourdomain name) into the box provided at the link above to do a retest.
Fully loaded time varies by upto 100%. Using the tool I could see that the CF data centre was changing from Sydney, to Melbourne to Hong Kong on a number of tests over a 15 minute or so period., with ping results in the 10s to 100s in Sydney, upto 2500 in Melbourne and about 1500 in HK My guess is that as it is on the free CF plan the Australian centres were kickiing us off when busy. This morning I see it is more stable and is in HK around the 1000 to 1500 mark on first ping:
HKG
Hong Kong International
IPv4
http/2
First ping: 1431
Second ping: 168
This is not ideal obviously and I have a question if I may?
We plan to move the site onto the Google Cloud. It is my understanding CF is integrated with GC. Am I right in thinking that we will not have this problem using GC & CF? and the site ttfb should be very quick?
Do you know at what sort of traffic figures we should be looking to move up to the paid pro CF version… are there other reasons to be on the pro plan whilst traffic is very low?.. so we can plan ahead
Thanks again for the great tool,
Kind Regards,
Rock
After days of tweaking my servers, I decided to cross-check with other sites on Cloudflare on why their TTFB is fast. I did find that the sites were not using Cloudflare’s HTTP/2 feature. Instead, the tests, which can be done using any page speed tools, reveals their HTTP/2 pointed directly on their servers.
I disconnected Cloudflare and tested my site and in deed the TTFB is very fast on my server that already has HTTP/2 enabled. However, when checking my Cloudflare account to disable the TTFB, I realized that it’s a paid feature, meaning Cloudflare is aware about it. I mean, HTTP/2 looks like a premium feature not to offer for free but in this case, it’s enabled and locked on the free account.
Another forum post, someone noted the same too here
That said, I think the best Cloudflare features that will make me foot the $20 bill are the security features, and fast ping times for redirects, DNS, server connect speeds, SSL, and server send requests. I will upload the test results for better illustration.