andreamarucci wrote:So you're telling me that I can have the same service for free using cloudflare? Basically we talked about that but I've never setup cloudflare
Yes, and to be honest, that is why I have grown very fond of Cloudflare recently. There is a small difference ... With CDN providers (for example cdn77), it is ONLY a cdn-provider for assets (for example images). With Cloudflare, you get the CDN, but also some other stuff (mostly security related), some which you don't need, and some which has some minor benefits. Personally, I thought a dedicated CDN provider would offer much better performance than Cloudflare for serving assets (images), but my tests show Cloudflare easily matched the others.
In fact, for our X3 demo website
https://demo.photo.gallery, we use MaxCDN (cdn provider) on top of Cloudflare. However, I intend to cancel the MaxCDN service once the 1yr subscription expires, because it turns out it offers no benefit on top of Cloudflare. It makes you wonder, how can Cloudflare offer this for free? I have been asking the same question since I completed the tests. Essentially, they just have a different business strategy, own their own servers, and bandwidth is basically ultra-cheap. I also have reason to believe that Cloudflare has the best technology involved, whereas other CDN providers simply purchase bandwidth from global distributors.
Technical differences
The technical differences between Cloudflare and other CDN services summarized:
- With Cloudflare, you set your domain to point to Cloudflare's nameservers, and all requests are routed through Cloudflare's network. Once this is done, you don't need to use different URL's for the CDN-specific assets like other providers. This is neither good or bad, but it's the main difference.
- With Cloudflare, you don't get "granular control" of your CDN resources (images). With all CDN providers (including Cloudflare), once an image is requested twice from a specific location on the globe, it gets cached on the server that is closest to where the request is coming from (edge server). In regards to Cloudflare, it might empty the edge cache for a specific location if the asset is not requested much.
We pay for Cloudflare premium, because they offer a wholesome service, including security, and the CDN is easily on par with other providers. However, if you for any reason wish to add a separate CDN provider, that is entirely possible with X3. There is a setting
cdn_files:
settings:
server:
cdn_files: # Assign a CDN url or subdomain to serve images
You would just assign your CDN url, either the one provided from the CDN, or a custom one. For example, on our demo website, we currently use:
cdn_files: https://demo-x3.netdna-ssl.com
The CDN url is the one provided to us from maxCDN, and basically pulls from the origin, which is demo.photo.gallery.