There are so many different CDN’s which are available in the market that selecting the best one has become a difficult task. If you are looking to get KeyCDN, here is a review of their services which can help you decide.
CDN has become one of the important aspect of Blogging infrastructure. Google has started to give more and more emphasis on fast loading sites which has increased the importance of CDN’s.
Your main server is usually located on one part of the world and would work fine if your users are from the same region. If people from other regions try to reach your site, your files need to travel more distance depending on your user’s location.
Because of this additional added travel, your files can take some time to reach to your users. It can give a feeling of slow loading site and might frustrate your users. It also depends on the amount of data which needs to be transferred. If your images are bigger, they will take more time to load.
CDN’s are supposed to solve this problem by having server all across the world which can cache your files. On the run time they will decide which server is closer to the user and serve the files from that server. This will reduce the distance which your files need to travel and reduce the loading time for your page across the world.
Table Of Contents
KeyCDN is contant delivery network which has over 35 data center and 75k zones deployed across the world. They have many edge servers which are located in each region to distribute the files easily across the globe.
You will get reliable, fast and vastly distributed platform to distribute your files. It also comes with a close integration for most of the CMS’s including WordPress. You can easily enable it with the help of a plugin and start distributing your files.
Type Of CDN Zone
Before we go further into the feature and pricing for KeyCDN, lets discuss the type of CDN zone which you can use. There are two type of CDN zones based on type of caching needs.
In this type of zone, your file will not be automatically cached at the edge server. When someone from a region visit your site first time, your file will be fetched from the origin (Your Web Server) and will be served.
So the first customer will still a lag while loading your site as the files still need to travel from your Web Server to the customer location. But once that is a server, the files will be cached in the servers available in the region. So any other requests coming from that region will be served with the files available closeby.
It is called Pull zones as it only fetches the files based on the request received. This is little easy for CDN’s to manage as they don’t need to waste storage for the file which nobody is requesting. They only work with active files and their distributions are automatically managed. So usually these zones cost less than the Push Zones.
Push caching is when you even don’t want your first user also to wait or files are big enough that it will take a long time to download. You can preload them on the caching zone so that it will deliver from that location.
Because you are asking CDN’s to preload your files, it means it needs to be pushed to the zones before anyone specifically asked for it. In this case, CDN’s has to work before any actual request and keep caching the files in the zone. So, usually, you have to pay extra money to use Push caching mechanism.
The only place it will be worth if you are having good traffic from any region and you are allowing large file downloads. In this case, you can preload these large files in that region for faster access.
Creating Distribution Zone
Once you understand about the Pull and Push Caching, you need to decide which caching mechanism you want for your distribution. You need to create a Zone based on the caching type which will distribute your files.
To Create a Zone, click on the Zones tab on the left menu and then select Add Zone option from there. If you have not created any zone, you will automatically be taken to create zone screen.
You have to enter a Zone name, Zone Status, Zone Type and Origin URL to create a pull zone. If you are creating a Push Zone, you don’t need Origin URL as you need to push the files for the distribution.
There are some advanced settings which allow you to take fine-grain control of your distributions. Only try to change them if you clearly understand those. By default, basic things are set and already optimized according to general needs. They should be good enough for most of the distributions.
Once your distribution zone is created and deployed, you can enable it in your WordPress install.
You will get first 3 zones as free which means you can serve up to three sites and they will only cost as per the usage. After that each zone will cost $1 a month extra than the usage.
Enable KeyCDN CDN in WordPress
KeyCDN comes with easy to use WordPress plugin which allows you to enable the CDN for your WordPress site. CDN Enabler is available in the WordPress repository for free of cost.
The plugin is very easy to set up, just enter the CDN URL and directories which you want to serve from your CDN zone. You can also set some exclusions for which you do not want to use CDN service. Once done those files will be served with the CDN URL.
CDN Enabler Plugin provides an easy integration to KeyCDN services with the help of API’s. You can also purge the CDN right from the WordPress Dashboard.
Though the CDN Enabler plugin is an easy choice, you might not want to add another plugin on your site. So most of the Caching plugins like W3 Total Cache also provide the KeyCDN integration. You can set it up as a Generic Mirror but there will be less control on the purging from WordPress dashboard. Please check this guide for detail setup instruction for W3 Total Cache and KeyCDN.
Zone Aliases Setup
Zone Aliases allows you to use a subdomain for your own domain for CDN vs the URL provided by KeyCDN. You can set it up in the Zone Aliases section in your KeyCDN dashboard.
Once you set it up in the KeyCDN dashboard, you need to create a CNAME record in the DNS Name server. The CNAME should point the Alias to your KeyCDN distribution URL.
After this setup, you can use your zone alias as the CDN URL. This will help in ranking the images on your domain as they all will be referenced from your subdomain. Zone Alias also help in case you have already set up SSL certificate for your site. You can now include your subdomain or wild-card domain in the existing security certificate to deliver the files over HTTPS.
LetsEncrypt SSL Certificate
One of the good thing about KeyCDN is easy integration with LetsEncrypt. You can just give the Zone Alias name and it can enable the SSL automatically for your CDN service. You just need to make sure that the DNS has been propagated successfully before enabling it.
To enable the SSL certificate, go into the Zones and click on Manage. Advanced Features contains a section about SSL/ Select Lets Encrypt from the drop down and save the zone.
You need to save the Zone Alias again after this so it will create an SSL certificate for you. Make sure DNS names are setup correctly before saving the zone alias. Even if you have already created the zone alias, just go to that screen and save it again to enable the SSL certificate.
The only restriction is that you can only generate the SSL certificate for one zone Alias. So if you have more than one Zone Alias defined, you need to look for other methods.
KeyCDN comes with instant purging and provides flexible way to purge your content from the edge servers. This is one of the major problem with other CDN’s like CloudFront as they charge for Purge requests.
CloudFront costs can increase a lot faster based on how many URL’s you need to invalidate and how you are doing it. KeyCDN does not charge for this feature and it’s available to all of their users.
They also provide an API access to Purge feature so you can purge the cache from the WordPress dashboard itself. You can purge the single URL or the entire zone.
If you are using CDN Enabler plugin in the WordPress, you get a CDN Purge button at your WordPress Dashboard. Just click on that and your CDN will be purged.
CORS and Cache Headers
KeyCDN makes it very easy to set and customize HTTP headers from the dashboard itself. If you are setting the HTTP headers correctly on your web server and want CDN to honor those, you can just set it up in the dashboard.
If you are not sure and want to define the expire header on the CDN level than set the values in Expire and Max-Expire fields in Advanced Features. This will ignore all the headers coming from your site and start adding Cache headers in the response. You can set the values accordingly.
You can also set to send the canonical URL in the response along with CORS header for cross-domain requests. All these customization’s are very easy and can be done directly from the KeyCDN dashboard.
It also allows you to create a custom Robots.txt file and serve it from the dashboard. This means you can still control what will be scan or list by Google right from the dashboard.
KeyCDN is not the top ranked performance leader in terms of response time but they have a good balance in terms of features and performances.
Their performance is around average but most of the CDN’s performance vary by only few milliseconds. So in terms of real time impact their is very little difference.
CloudFront is little faster than KeyCDN but only by 2-3 milliseconds. Like I mentioned above CloudFront charges for cache invalidation where KeyCDN does not. So its about creating a balance between features and performance. Other CDN’s have issue in setting up Lets Encrypt SSL certificate where KeyCDN has one click integration.
All of the KeyCDN features are included in the pricing and available to all customers. At this point of time there is very minimal difference in terms of response times of all the CDN networks and KeyCDN is no different.
KeyCDN comes with one of the competitive pricing structure with respect to other CDN providers. Currently they charge around $0.04 / GB in North America and Europe which is almost half the price of Amazon CloudFront.
You will only pay for your usage, so there is no monthly cost attached to the KeyCDN. You can connect your sites and based on the usage of bandwidth or Data Out, you pay the amount.
The only problem is that they work on pre-credit basis which means you need to purchase the credit in your account to use their services. These credits will be redeemed against the services you are using. The minimum purchase amount for the credits is $49 with a validity of one year.
This will not be a problem for the sites where the yearly expense is more than $49 but if your expense is lower than that, you might risk loosing some of the credit at the end of the year. Though KeyCDN allows the credit rollover if you make another payment before the end of the year but that means spending another $49.
If you are in the category where you don’t want to spend that much amount upfront or just starting your blog, Amazon CloudFront will be a good option. It can easily serve the static files and does not need any upfront commitments. My suggestion is to look for KeyCDN services if your monthly expense is already touching $5 per month.
The pricing is little higher for the push zone or Asia and South America zones. So check the official pricing page to project your monthly expenses.
KeyCDN is one of the good CDN networks which can help you scale according to your need. If you are already spending around $49 per year on your CDN, you can use its pay-per-use pricing structure.
If your yearly spend is less than than use the above link for getting a $10 as a gift which should cover the initial expense for starter blogs. Enable KeyCDN services and speed up your blog.