Page 1 of 1

Using a CDN like CDN77

Posted: 06 Jul 2015, 09:11
by andreamarucci
I'm planning to use this CDN to serve all my images from the gallery (and also to use for all the other sites under the same domain)

I'm planning to create something like cdn.kog.it (kog.it is the main domain) and I'm guessing how to correctly configure my gallery to serve all the images from the CDN.

Thanks!

Re: Using a CDN like CDN77

Posted: 06 Jul 2015, 12:35
by mjau-mjau
Nice. This is quite easy with X3 ...

I have a question first though. I seem to remember you setup Cloudflare for your domain no? I will let you in on a tip ... I personally did extensive testing with several CDNs (Content Delivery Networks), and it turns out that the integrated Cloudflare CDN service easily matches other premium CDN services. Therefore I am wondering for what specific reason you want to add a separate CDN provider?

There are a few differences of course ...

Re: Using a CDN like CDN77

Posted: 06 Jul 2015, 12:44
by andreamarucci
Good question. Probably CDN77 has some differences, I think, and since my traffic is not so high I've thought that with less than 50 euro per year I can have a good CDN.

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 :-)

Re: Using a CDN like CDN77

Posted: 06 Jul 2015, 13:51
by mjau-mjau
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:
Code
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:
Code
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.

Re: Using a CDN like CDN77

Posted: 06 Jul 2015, 17:36
by andreamarucci
Well, thanks for the explanation. I think I'll try to use CDN77 for one year since they cost about $49 for a Tb of data and I barely consume a mere 10 or 15Gb/month for all the sites under the kog.it domain...

In any case thank you very much for all you explanations :-) Very helpful