TTFB Too high (1.2 sec on Cloudflare)

Cloudflare business plan does offer bypass cache on cookie. Session is a little harder if it’s not defined by a cookie… custom cache key might be an option (that’s an ENT feature only today unfortunately). Finding the right balance for caching at the edge for customized content can be a tricky business… Railgun might also help for dynamic content performance and Argo is is another possibility as well.

My TTFB is also long – 2.62 seconds.

I am utterly confused by all of the TTFB talk. Is there anyone who can help offer advice? My website is paper blazer dot com.

I will love you forever and ever.

Thank you!!!

Your TTFB is also extremely high when going direct to the origin. So for uncached requests/ dynamic content we have to wait on the origin as well. For pages where you can leverage cache everything that might help, but for dynamic content a less overloaded origin and/or possibly railgun might help.

without CF
curl -ko /dev/null --resolve epfo.services:80:139.59.91.100 \ -H ‘Cache-Control: no-cache’ -s -w “Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n” http://epfo.services
Connect: 0.000000 TTFB: 0.000000 Total time: 0.124665
Connect: 0.000000 TTFB: 0.000000 Total time: 0.509377
Connect: 0.000000 TTFB: 0.000000 Total time: 0.124728
<DOCTYPE html
<\html>
Connect: 0.027933 TTFB: 0.292492 Total time: 0.402994

with cF

curl -ko /dev/null --resolve epfo.services:80:139.59.91.100 \ -H ‘Cache-Control: no-cache’ -s -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" http://epfo.services

Connect: 0.000000 TTFB: 0.000000 Total time: 0.124693
Connect: 0.000000 TTFB: 0.000000 Total time: 0.253018
Connect: 0.000000 TTFB: 0.000000 Total time: 0.124560
!DOCTYPE html>

Connect: 0.023965 TTFB: 0.057787 Total time: 0.107832

I really confused about the above data and command whether is accurate or not

datacenter located in banglore digital ocean.

when it was at china speed is good but now it worse.

how to improve Cloudflare Indian traffic?

is it better to turn off Cloudflare performance?
or pay something to Cloudflare for Indian colocation for 30+ sites in my account.

migrating datacenter to any other location which Cloudflare pop routed for my traffic.

anyways to change the co-location of my website?
or can Cloudflare team set default colocation for my account?

how to frequently colocations changes for a website?

Both of your commands directly hit the origin server. By specifying your origin IP address, you’re bypassing Cloudflare. My eyes may have missed something, but both commands are identical, correct?

My favorite tool does show that Bangalore has the slowest TTFB:
https://performance.sucuri.net/domain/epfo.services

A test from Mumbai shows your domain using Cloudflare’s Tokyo POP. I know Cloudflare has a Mumbai datacenter, so I don’t know why it’s not using that.

Cloudflare limited Indian pops to paid plan. (Official said on another topic).

But I have noticed my another free plan website
Used MAA Chennai Indian location.

How frequently these collocations are change?

How much percentage of traffic routed through specific colocation?

Since my traffic is 100% from India. Any other ways to optimize it.
Maybe blocking all countries other than india, is this route colocation servers India only.

Is it better turnoff Cloudflare?
How to use Cloudflare only as dns proxy?so requests serves from origin data center.

I know some POPs don’t serve free plans, but I haven’t seen an official list. I think it changes from time to time as costs come down. I don’t know if they limit how much of your traffic would go through a more expensive POP. I’ve not heard of such an arrangement.

Blocking countries from your website most likely won’t change this. Maybe a paid CDN company has datacenter in India. But at that point, you could just pay for Cloudflare. I’ve used KeyCDN in the past and their prices are decent, though Asia traffic costs 3x Europe/North America. They have a POP in Bangalore. Maybe the $20/month here is the best deal.

You can certainly turn off the Cloudflare proxy by setting your DNS entry to :grey:. You’ll get very fast DNS performance, with the benefit of your local datacenter.

then Cloudflare shared SSL doesn’t work on my domain. so I have to install let’s encrypt

1 Like

Same issue I am also seeing on our domain HealthClues

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

.

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/

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.

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).

1 Like

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

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.

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.

1 Like

Hello i am Manzoor Khan. I also face the same issue whenever i checked out my site speed and other things.
site is https://www.drugsbanks.com/

What’s telling you that it has a high. TTFB? It looks good to me. Pretty low in most places:
https://performance.sucuri.net/domain/www.drugsbanks.com

2 Likes

Thank you sir

2 Likes