Using a Content Delivery Network

fixer

I'm In My Prime
Joined
Jan 28, 2010
Messages
2,054
how does that work? you move all your static resources to some amazon server somewhere?
 

Paul M

Super Moderator
Joined
Jun 26, 2006
Messages
4,077
Well not necessarily an Amazon server, but to the the CDN servers, yes.
 

eva2000

Habitué
Joined
Jan 11, 2004
Messages
1,830
CDN come in 2 types

1. push - you upload files to their storage i.e. Amazon S3 storage with Amazon Cloudfront
2. pull - where CDN server works as a reverse proxy in front of your server and dynamically on the fly will cache on their CDN edge servers subsequent requests after initial request. On cache miss/expiry, CDN edge server will request the files from origin web server of yours

It's more common to have pull based CDNs like Cloudflare, Incapsula and Sucuri and KeyCDN, BunnyCDN etc.

I use Cloudflare for my forums https://community.centminmod.com/ and my Wordpress blog at https://servermanager.guide/ :D

I've used Cloudflare for 9+ yrs as a paying customer and I maybe a bit biased as since 2018, I am an official Cloudflare MVP as well so get to work more closely with Cloudflare product teams and beta test/provide feedback for new developing Cloudflare products :D
 
Last edited:

fixer

I'm In My Prime
Joined
Jan 28, 2010
Messages
2,054
how much is the "free tier" after the 12 month trial?
 
Last edited:

Joel R

Habitué
Joined
Nov 24, 2013
Messages
1,035
Here's a simpler explanation of Cloudflare (which offers more than CDN):

In short, a CDN is a global network of servers that pull content from your server and store them at 'edge' servers located around the world, so when users request the info the loading times are optimized. The content is still originally stored on your server.

I use CloudFlare (paid business plan $20 / mo). Be aware that not all of CloudFlare's services work (such as Rocket Loader) will work with Invision Community, but it's dirt simple to set-up. Keep in mind that IPS Support doesn't advise on any configuration for CloudFlare.
 

Al.Ch

Aspirant
Joined
Jun 1, 2016
Messages
36
I have done many optimization projects and tested many services. Cloudflare has never optimized the websites as it is advertised.

If you want a fast website here are my recommendations based on my experience to have a faster page load:

Xenforo:

- Get a fast hosting with LiteSpeed webserver
- Install the LiteSpeed plugin on your XenForo
- Use MaxCDN which now is Stackpath (I have tested 4-5 CDN cervices and this one was the fastest with an user-friendly interface.

By a little bit modification on the XF templates and hiding unwanted css and js files for guests I got 1.2sec loading time at WebPageTest.org

I have also done it for Woltlab BB for one of my customers which was also easier than XF as many optimization options are already included in the software settings.

Recently LiteSpeed has released a new service which loads all your website through their cloud system (which also includes amazon aws). They give you 20GB/m for free. You would need to add an “a name” record for your domain which not all registrars support at the moment. You would need to use cloudflare and add the a names to use this service. I am still testing this service and can not provide you with a good/non-biased feed back.
 

eva2000

Habitué
Joined
Jan 11, 2004
Messages
1,830
I have done many optimization projects and tested many services. Cloudflare has never optimized the websites as it is advertised
Maybe you didn't properly configure Cloudflare and your origin backend ? What geographic locations you tested from ? One geographic location Cloudflare doesn't optimise well unless you're on Enterprise plans is India as most of their non-Enterprise India traffic skips their India datacenters for Singapore due to ISP costs.

You can use this test site to check which datacenter of Cloudflare's you hit at https://cloudflare-test.judge.sh/
 

MagicalAzareal

Magical Developer
Joined
Apr 25, 2019
Messages
758
Maybe you didn't properly configure Cloudflare and your origin backend ? What geographic locations you tested from ? One geographic location Cloudflare doesn't optimise well unless you're on Enterprise plans is India as most of their non-Enterprise India traffic skips their India datacenters for Singapore due to ISP costs.

You can use this test site to check which datacenter of Cloudflare's you hit at https://cloudflare-test.judge.sh/
Australia is another one, to my knowledge, they route all the traffic half-way up-to Asia, unless you're using Argo due to costs.
 

eva2000

Habitué
Joined
Jan 11, 2004
Messages
1,830
Australia is another one, to my knowledge, they route all the traffic half-way up-to Asia, unless you're using Argo due to costs.
Use to be the case now it depends on Aussie ISP. Alot of my Australian traffic and my Brisbane/Sydney ISP/VPN to Cloudflare goes through Cloudflare Sydney and Brisbane datacenters according to my Nginx origin backend logging of which Cloudflare datacenter visitors are served from - see https://community.centminmod.com/threads/cloudflare-custom-nginx-logging.14790/. This is with my Cloudflare free, pro and business plans too.
 

Al.Ch

Aspirant
Joined
Jun 1, 2016
Messages
36
Maybe you didn't properly configure Cloudflare and your origin backend ? What geographic locations you tested from ? One geographic location Cloudflare doesn't optimise well unless you're on Enterprise plans is India as most of their non-Enterprise India traffic skips their India datacenters for Singapore due to ISP costs.

You can use this test site to check which datacenter of Cloudflare's you hit at https://cloudflare-test.judge.sh/
The problem was not the optimization itself... CF is just giving horrible first byte time results, while with similar services such as NetDNA or QUIC, first byte time is amazing.

Therefore, the problem is in the first step!
 

ddrager

Neophyte
Joined
Jan 17, 2020
Messages
3
Hi all, I am new here but have extensive experience with Cloudflare. Hi eva2000, you have optimized my database years ago :)

The free Cloudflare plan does not allow you to cache HTML files. It will only cache, and serve at the edge, your js, css, and image files. This means your requests actually take an additional hop through Cloudflare, this can in some instances actually make your site appear to load slower than without Cloudflare.

Once you upgrade to Cloudflare upper tiers you have the option to cache whole webpages at the 'edge'. This makes the response times very quick, globally. When both your html, files, plus all the additional assets are cached at the edge, Cloudflare becomes very fast indeed.

Yes, Argo is an additional network optimization that makes the connection from Cloudflare to your server even faster. That costs additional money as well.
 

eva2000

Habitué
Joined
Jan 11, 2004
Messages
1,830
Indeed most folks don't fully optimise their Cloudflare feature/setup as they do not fully understand how Cloudflare works on caching level with what is cached by default and what isn't by default (optionally can be cached) - especially now that your have Cloudflare workers as an option too to deploy even more advance caching methods which I've done for my Cloudflare free plan based Wordpress blog at https://servermanager.guide/.

for starters see
Cloudflare TTFB is only one metric for page speed performance where other factors, Cloudflare's features can help with for overall page speed performance.
 

overcast

Adherent
Joined
Mar 17, 2019
Messages
485
I have yet to even hit the 1K per day limit on hosting let alone 20k per month limit. I think on that note I'd need longer time to add CDN in my list of tools.
 

MagicalAzareal

Magical Developer
Joined
Apr 25, 2019
Messages
758
The problem was not the optimization itself... CF is just giving horrible first byte time results, while with similar services such as NetDNA or QUIC, first byte time is amazing.

Therefore, the problem is in the first step!
QUIC is a protocol not a service. It is available for Cloudflare, although it is currently in alpha or beta. The same would likely apply for other CDNs as it is extremely new.

I do agree that Cloudflare misses some HTML page optimising opportunities, although it speeds up a bunch of other things too and saves a lot of money.
 

Al.Ch

Aspirant
Joined
Jun 1, 2016
Messages
36
QUIC is a protocol not a service. It is available for Cloudflare, although it is currently in alpha or beta. The same would likely apply for other CDNs as it is extremely new.

I do agree that Cloudflare misses some HTML page optimising opportunities, although it speeds up a bunch of other things too and saves a lot of money.
As mysiteguy mentioned, QUIC.CLOUD is a new CDN service by LiteSpeed which works with “ANAME”.
 
Last edited:

Al.Ch

Aspirant
Joined
Jun 1, 2016
Messages
36
Hi all, I am new here but have extensive experience with Cloudflare. Hi eva2000, you have optimized my database years ago :)

The free Cloudflare plan does not allow you to cache HTML files. It will only cache, and serve at the edge, your js, css, and image files. This means your requests actually take an additional hop through Cloudflare, this can in some instances actually make your site appear to load slower than without Cloudflare.

Once you upgrade to Cloudflare upper tiers you have the option to cache whole webpages at the 'edge'. This makes the response times very quick, globally. When both your html, files, plus all the additional assets are cached at the edge, Cloudflare becomes very fast indeed.

Yes, Argo is an additional network optimization that makes the connection from Cloudflare to your server even faster. That costs additional money as well.
Indeed most folks don't fully optimise their Cloudflare feature/setup as they do not fully understand how Cloudflare works on caching level with what is cached by default and what isn't by default (optionally can be cached) - especially now that your have Cloudflare workers as an option too to deploy even more advance caching methods which I've done for my Cloudflare free plan based Wordpress blog at https://servermanager.guide/.

for starters see
Cloudflare TTFB is only one metric for page speed performance where other factors, Cloudflare's features can help with for overall page speed performance.

Yes, I am aware of this but when I compared the speed and results of paid CF and LiteSpeed Cache a CDN service, CF does not worth it at all.

Not to mention that LiteSpeed is giving me way better results. The paid services of CF are good but does not worth it. And again I believe they are over advertised.
 

Kyrie

Habitué
Joined
Sep 2, 2009
Messages
1,016
I've always used CloudFlare CDN and it's worked well for the most part. I also though somewhat feel like depending on size of site it might be overkill??
 

Al.Ch

Aspirant
Joined
Jun 1, 2016
Messages
36
I've always used CloudFlare CDN and it's worked well for the most part. I also though somewhat feel like depending on size of site it might be overkill??
No, as I mentioned the first byte time for me is an issue.
With NetDNA/LiteSpeed its always less than 400ms or max 500. With CF it has always been +800.

I would extremely recommend LiteSpeed. Even the free (OpenLiteSpeed) is amazing and comes with major functions.
 
Top