CDN and TTFB

Hi there,

I own a Joomla site situated in France and I’m aiming at customers in France, USA and Australia. The site is on dedicated server, paged delivered with nginx in http2. I tried to use a CDN (MaxCDN/Cloudfront) to improve TTFB on my sites in other countries but figured out it was a bad idea since I see no improvment at all.

with CDN
https://www.webpagetest.org/result/170324_67_5MDC/ (AU)
https://www.webpagetest.org/result/170324_QA_5M70 (US)
https://www.webpagetest.org/result/170324_NZ_5NQM/ (BEL)

without CDN
https://www.webpagetest.org/result/170403_ET_1DMM/ (AU)
https://www.webpagetest.org/result/170327_32_Z49/ (US)
https://www.webpagetest.org/result/170327_16_N44/ (BEL)

So I suppose this is because joomla create dynamic pages which are not hosted on CDN but generated by my site, am I right ?

1./ Do you know any solution that would improve ttfb in my case for Australia and US, because they are pretty crappy as compared to Europe ? Do you think Cloudflare would do something ?

2./ Do you any advice I could do to improve the load time in Australia, with or without CDN, because it is very high especially in first view ?

Thank you for reading,

Cheers,

Fred

Hello Fred

You are absolutely right. As long as the actual HTML page is built dynamically, a CDN won’t help for your TTFB.

I am just now doing a major overhaul to speed up my fully dynamic site.

I rewrote the whole website so that the initial baseload (the “HTML file”, javascript, CSS) is always the same, and that everything that’s dynamic is loaded via AJAX calls. I even changed the URL scheme so it uses #, i.e. instead of example.com/some/path/to/page, the URL of the same page is now Example Domain.

Of course, that doesn’t speed up the eventual, personalized content to the visitor, but the site appears way faster because the page is immediately there from the closest CDN server. Things that are filled in via AJAX have spinners and “loading” messages in them.

I don’t know Joomla but maybe there have been people before you who have found a good solution and put it into a plugin.

Good Luck!

Hi someoneelse,

I wish I could recode my html but it’s not possible right now.

That is very clever to replace the dynamic load of the page with ajax, althought I would be worried by the fact it is properly interpreted by google bot (even thought it is said the bot has improved his skills, i’m not confident).

For my joomla installation, i’m much more trying to delete plugins than to install some ^^ And I’ve been trying a fairly good hosting service which seems to have solved the problem. Believe it or not, it seems that the dynamic cache has improved the ttfb a lot. I’m still testing right now but I will be back with data.

Regards

It looks like your DNS provider may be the biggest problem, although the CDN provider isn’t working that well elther…

I’d look into the following:

  • change DNS provider to one with a more geographically neutral configuration
  • change CDN provider ( or play with expiry headers? )

My current favourite is to use Amazon for both.

In order to make a quick improvement to the doc complete time, combining all of your javascript into a single file is going to make a massive difference!

[Whilse someoneelses solution may improve results, I’m not too sure about the UX side of things. Really heavy JS sites just frustrate the bejeepers out of me!]