Speed up your site with a CDN

Speed up your site with a CDN 2015-07-18

No permission to download

Mouth

Well-known member
Mouth submitted a new resource:

Speed up your site with a CDN - Use KeyCDN (Content Delivery Network) to cheaply accelerate your site

What is a CDN?
A content delivery network or content distribution network (CDN) is a large distributed system of servers deployed in multiple data centers across the Internet. The goal of a CDN is to serve content to end-users with high availability and high performance. CDNs serve a large fraction of the Internet content today, including web objects (text, graphics and scripts), downloadable objects (media files, software, documents), applications (e-commerce,...

Read more about this resource...
 
Argh, if you wrote that some time ago I had used keycdn instead of CDN77. I admit that CDN77 work very well but, in my case, I've choosed KeyCDN for the server they have in Italy. CDN77 doesn't have servers in italy...
 
I don't get it... don't you have to upload the static files of data and styles folders to the CDN network?

Or do they somehow automatically download them from your site and save on their servers and serve them from there?

How often do they download them in that case?

Thanks for a great guide though.
 
don't you have to upload the static files of data and styles folders to the CDN network?
No, you don't have to. Although, this is certainly an option. You can use FTP upload or rsync (for constant/regular) sync if you want to.

Or do they somehow automatically download them from your site and save on their servers and serve them from there?
Yes. When a client requests a URL they don't have stored locally, they http/https request it from your server then cache it and serve it locally from then on.

How often do they download them in that case?
According to the expiry period set by your web server, or you can override it within your KeyCDN advanced settings and set the expiry time.
Generally you set static files to expiry after 30 days.
 
I've been thinking about this for a while, and think it would suit my purposes for many of my sites. My main site uses wordpress frontend with XF in a folder. Been looking at keyCDN for wordpress, and now XF thanks to this Mouth. Nice.
 
Last edited:
Changed over to your KeyCDN recommendation Mouth... very happy, thank you. Shifted 250,000 requests in less than 24hrs off to them, instead of my server. Had some issues getting the wordpress aspect setup, but that was the difference between using the different cache plugins. Stupid super cache was crap... W3TC one was flawless. XF had no issues with immediate distribution.

Increases costs, but the user benefit is worth it -- and I will certainly get far more growth now from my server before needing further upgrades.
 
Looking at real time, cache hit ratio stays at 0%.
Analytics states "No pull zone" for cache hits, wonder what's going on.
 
The advanced settings shouldn't need be touched, other than if you're using SSL. I use the keycdn shared ssl with zero issues.
 
Could you share your advanced feature settings for pull zone @Mouth ?
Force Download = disabled
CORS = enabled
GZip = enabled
Expire = 10080
SPDY = enabled (my site is https)
Allow Empty Referrer = enabled
Secure Token = disabled
SSL = shared (my site is https)
Force SSL = enabled (my site is https)

Origin shield = enabled
Max expire = 1440
Ignore Cache Control = enabled
Ignore Query String = disabled
Strip Cookies = enabled
X-Pull Key = MySiteName
Canonical Header = enabled
Robots.txt = disabled
Optimise for HLS = disabled

The advanced settings shouldn't need be touched, other than if you're using SSL
Agreed.
 
Okay, same here. Got 61% cache hits, how about you guys?
Wondering if there's anything else I could add to CDN also, I've put the logo, node icons and header background in too.
 
Thanks for posting this @Mouth, this could come in handy on one of my sites that gets worldwide traffic. Albeit not much traffic, but speeding it up for those users sure would help.
 
@Mouth how many 4xx client errors do you have? I've got 491 in 24 hours, not sure if I should be concerned. If the resource just doesn't load upon error, then that's a problem.
 
Top Bottom