TTFB differs when testing Joomla site with CDN

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
goble
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 244
Joined: Sat Jan 09, 2010 11:23 am

TTFB differs when testing Joomla site with CDN

Post by goble » Sat Jan 22, 2022 1:05 pm

Hello,
seems that my home page at explora.mu is having a slow Server response time i.e. slow TTFB (Time to First Byte).
From gtmetrix.com :
-------------
IMPACT : High
Audit : Reduce initial server response time
Root document took 831ms
Keep the server response time for the main document short because all other requests depend on it.
----------------
After reading more about this, I created a test file ttfb.html to make the test.
Results : 306ms
From these tests I understand that it has something to do with the way my site is optimized and not the server itself since the HTML would load faster.
However if I do the same test in Chrome inspect tool, it gives more than 1s for both my joomla and HTML file. So here, it seems that my server is at fault since both joomla and html file has same TTFB

Anyone having the same issue ? Or am I missing something ?
My Joomla Stock Photo Download site https://explora.mu

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28822
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: TTFB differs when testing Joomla site

Post by Per Yngve Berg » Sat Jan 22, 2022 2:07 pm

Please post your FPA. See red frame above.

Is OPCode Cache enabled in php on the server?

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12474
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: TTFB differs when testing Joomla site

Post by brian » Sat Jan 22, 2022 7:29 pm

TTFB is always server setup
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

goble
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 244
Joined: Sat Jan 09, 2010 11:23 am

Re: TTFB differs when testing Joomla site

Post by goble » Sun Jan 23, 2022 5:35 am

Hi and thanks,

For the FPA, am not comfortable posting the results here. @Per Yngve Berg, I've pm it to you.

I know Joomla is not updated, am waiting for other extensions updates (else they might not work).

For the OPCode cache, I have opened a ticket with the hosting provider to ask. Anyway do I need it when using a free CDN (cloudflare) ?

Am on a shared server and the hosting provider, cannot change the change php handler to PHP-FPM.
They proposed a cloud hosting as from USD 340 /mth which is above my budget, the website being a non-commercial website
My Joomla Stock Photo Download site https://explora.mu

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28822
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: TTFB differs when testing Joomla site

Post by Per Yngve Berg » Sun Jan 23, 2022 10:31 am

You have a SU type PHP API: cgi-fcgi, so you are good. Works the same way as php-fpm.

Ask your host to enable Allow url fopen so you can update Joomla.

com_socialconnect is using a deprecated call. Get an update.

You should have mentioned CDN from the start. Tat involves an extra step from web site to client.
I have added it to the title for you, so experts can reply.

There are more efficient ways to handle Sessions than using the database. Research what works best with a CDN.

With OPCode cache off, the server have to compile the php code on each request.

goble
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 244
Joined: Sat Jan 09, 2010 11:23 am

Re: TTFB differs when testing Joomla site with CDN

Post by goble » Mon Jan 24, 2022 7:10 am

Hi Per and thanks for your in-depth analysis.
You have a SU type PHP API: cgi-fcgi, so you are good. Works the same way as php-fpm.
>> Great ! At least a good news ! ;-)
Ask your host to enable Allow url fopen so you can update Joomla.
>> I have enable it in Cpanel > MultiPHP INI Editor
com_socialconnect is using a deprecated call. Get an update.
>> Have contacted the K2 dev team (they developed it). I can't figure out if there is a newer version (in back-end it won't tell me, have got the v1.10.0)
You should have mentioned CDN from the start.
>> Sorry for that.
Tat involves an extra step from web site to client. I have added it to the title for you, so experts can reply. There are more efficient ways to handle Sessions than using the database. Research what works best with a CDN.
I have googled a bit about what cloudflare says about this (sorry if this topic is starting to fall out of a direct joomla performance question). In an interesting article, cloudflare is saying "Stop worrying about Time To First Byte (TTFB)" https://blog.cloudflare.com/ttfb-time-t ... eaningles/.
As far as I understood this article, it's explaining that the TTFB don't matter as far as the total loading time of the page is low. From what I have learned : beside considering the total loading time of page, TTFB might be a ranking signal in SEO. Am I right in saying so ?

I've made more tests on my hosting account through GTmetrix. 2 different domain names (the 1st one on cloudflare and the 2nd not on CDN) both on same server. Tests were done at the same time on both sites
explora.mu/ttfb.html (through cloudflare)
TTFB: 364ms
TTFB: 131ms
TTFB: 346ms

explora.mu/ (joomla website & through cloudflare))
TTFB: 975ms
TTFB: 924ms
TTFB: 926ms

***2nddomain***/ttfb.html (not through CDN)
TTFB: 477ms
TTFB: 371ms
TTFB: 369ms
My Joomla Stock Photo Download site https://explora.mu

goble
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 244
Joined: Sat Jan 09, 2010 11:23 am

Re: TTFB differs when testing Joomla site with CDN

Post by goble » Mon Jan 24, 2022 7:45 am

Finally found the solution : Supercharge Site Load Time & Reduce TTFB By 947% Using Cloudflare
https://www.digitalkube.com/reduce-cloudflare-ttfb/

New results :
explora.mu/ (joomla website & through cloudflare))
TTFB: 68ms
TTFB: 80ms
TTFB: 53ms
My Joomla Stock Photo Download site https://explora.mu


Post Reply

Return to “Performance - Joomla! 3.x”