Webpagetest.org TTFB different from different location


#1

Hello,

My website shows everything perfect from Singapore but from other location specially from USA it shows long response time. any idea why?

below are two screen shots for references.

https://www.webpagetest.org/result/190222_0T_34c46bf08819a31e0de4e58a7246f06d/

https://www.webpagetest.org/result/190222_P1_489aac834b9ee85a2f70eceb1328fba8/

CDN should show similar performance from every region correct?

Thanks in advance.


#2

You can expect similar performance for assets that are cached by Cloudflare, such as the image files on both tests. However, the TTFB has to do with the HTML, which Cloudflare does not cache by default. That means Cloudflare has to request it from your origin server, and the further the origin is from a given CF data center, the longer it will take to receive the response in time to forward it to the visitor.

You could create a “cache everything” page rule to make Cloudflare cache the generated HTML, but that has its side effects.


#3

What types of side effects my friend? please help.


#4

Your site is an e-commerce website, and therefore many pages would not be suitable for caching, as they need to remain “dynamic”, that is, they need to be regenerated by the origin for every visit.

You’d need to figure out exactly what can be cached without interfering on your website functionality. Then you can create rules that prevent these files from being cached. Assuming for example that all the pages on your website that must remain dynamic are either on a folder /cart or /payment, then you could have 3 page rules:

/cart* >>> Cache Level: Bypass
/payment* >>> Cache Level: Bypass
/* >>> Cache Level: Cache Everything

This would avoid that one client’s information (purchases, navigation history etc) is made available to others, which could probably happen if you set “cache everytthing” for all pages on an e-commerce site.


closed #5

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