I know a lot of you have been asking about this, I even got emails from a couple of you inquiring about the difference between CloudFlare and KeyCDN and also what the best CloudFlare alternative is. Instead of responding individually each time I decided to put together this blog post, CloudFlare vs KeyCDN, to see how they stack up against each other. I am using my case study domain, perfmatters.io.
Best CloudFlare Alternative – KeyCDN
First, let me explain the differences between CloudFlare and KeyCDN.
A lot of people I chat with think that Cloudflare is just a CDN. In reality, CloudFlare isn’t really a standard CDN at all. With CloudFlare you are passing all of your traffic through them, where as a normal CDN you serve only certain assets through them. And CloudFlare offers many other services, such as DNS, security, and optimization. CloudFlare has a free plan, unlike many other CDN providers. One of the biggest advantages to CloudFlare is probably their DDoS protection, however this is limited in the free version.
KeyCDN is a global content delivery network which focuses entirely on speeding up your content delivery. While KeyCDN is not free they offer the lowest prices available from any other CDN on the market at $0.04/GB.
Below are some of the biggest differences between the CloudFlare free plan and KeyCDN.
|CloudFlare Free Plan||KeyCDN|
|Analytics:||Updated every 24 hours||Real time|
|Edge Cache:||Min 2 hour||No restrictions|
|Raw Logs:||Not in Free Plan||Included|
|Custom SSL:||Not in Free Plan||Included|
|Max Upload Size:||100MB||No Limit|
|Max Cache Size:||512MB||No Limit|
|Cache Dynamic Content:||Not in Free Plan||Possible|
|DDoS Protection:||Basic (Edge + Origin)||Basic (Edge)|
|HTTP/2 Support:||Fully Supported||Fully Supported|
Another important thing to note is that CloudFlare doesn’t have transparent pricing for high volume plans (it won’t be free!) KeyCDN is very upfront about their pricing for high volume plans.
CloudFlare also doesn’t cache common static files such as mp3, mp4, zip, rar, etc. You can see a list here of what they do cache.
Also just like CloudFlare, KeyCDN also closely mitigates DDoS attacks in the background to help keep our users’ websites safe. Their edge servers are being continuously monitored to detect and rectify any possible attacks. This is one area where CloudFlare does have an advantage as they offer protection on both your origin server and edge servers since you are running all of your traffic through CloudFlare. With KeyCDN, you are only serving certain assets through their edge servers. However, your origin server can still be attacked if the attacker knows the IP of the origin server.
You are probably thinking that is all awesome, but CloudFlare is still free. Well, let’s take a look at the pricing for KeyCDN, as it might surprise you. Take my website for example: brianjackson.io gets around 47,000 visitors a month and uses around 35GB of CDN bandwidth per month. If we take a look at KeyCDN’s pricing page (pay-as-you-go program) and do the math, I am paying $2.41 a month.
Note: There is a minimum of $2.41 a month required, or $29 a year. So as you can see, KeyCDN is not going to break the bank. If you want to upgrade to CloudFlare’s pro plan you are looking at a minimum of $20 per month. But I will let the speed tests below speak for themselves.
CloudFlare Error 522
Then there is the ever so popular CloudFlare Error 522 that I’m sure many of you have seen. I took some snapshots over the last couple weeks and I have seen this error popup on huge sites like stackoverflow.com and medium.com. Every time CloudFlare says the host is having the issue, but I highly doubt it was a stackoverflow.com problem.
Stumbled across this the other day, CloudFlare breaking CloudFlare?
CloudFlare vs KeyCDN Benchmarks
So I ran perfmatters.io through multiple benchmarks of CloudFlare vs KeyCDN. I ran tests through WebPageTest to get a median. You can see a full comparison at the bottom of this post.
The reason I used WebPageTest primarily is because it supports HTTP/2 (Chrome 43+). Pingdom and GTMetrix do not support HTTP/2 yet. I ran 5 tests to get a median, the results are below.
- First View – Load Time: 1.271s
- First View – First Byte: 0.231s
- First View – DOC complete: 1.271s
- First View – Fully Loaded: 1.372s
- Repeat View – Load Time: 0.885s
- Repeat View – First Byte: 0.132s
- Repeat View – DOC complete: 0.885s
- Repeat View – Fully Loaded: 0.885s
With CloudFlare I was seeing higher load times, DOC load and higher TTFB. You can confirm that your website page/assets are serving from CloudFlare by looking at the HTML doc header, as it will return
cloudlfare-nginx as the server.
I then switched my DNS back and deployed KeyCDN using WP Rocket. All caching settings in the plugin remained the same.
I ran 5 tests to get a median, the results are below.
- First View – Load Time: 1.170s
- First View – First Byte: 0.175s
- First View – DOC complete: 1.170s
- First View – Fully Loaded: 1.261s
- Repeat View – Load Time: 0.790s
- Repeat View – First Byte: 0.153s
- Repeat View – DOC complete: 0.790s
- Repeat View – Fully Loaded: 0.790s
With KeyCDN I was seeing quicker load times, lower DOC loads and TTFB.
KeyCDN + Cache Enabler + WebP
I also wanted to see the difference if I used KeyCDN’s cache enabler plugin with WebP support.
I ran 5 tests to get a median, the results are below.
- First View – Load Time: 1.117s
- First View – First Byte: 0.204s
- First View – DOC complete: 1.117s
- First View – Fully Loaded: 1.195s
- Repeat View – Load Time: 0.765s
- Repeat View – First Byte: 0.186s
- Repeat View – DOC complete: 0.765s
- Repeat View – Fully Loaded: 0.949s
CloudFlare posted a blog post back in 2012 titled “Stop worrying about Time To First Byte (TTFB).” However, TTFB is very important and shouldn’t be ignored! Here is what Ilya Grigorik, a well-respected web performance engineer at Google had to say about it.
Cloudflare ran a test and concluded that time to first byte (TTFB) does not matter..Except, it absolutely does. As they say: if you’re experiment contradicts intuition, check your experiment.
By doing this, while the TCP connection is still going through the slow-start phase, the browser can kick off the connections for blocking resources and consequently make the whole experience much faster.
Cloudflare’s test is just silly. Of course it doesn’t matter if you flush your ‘200 OK’ after 1ms vs 1s – nothing magical there. But if you know what you’re doing and craft the response right, then it can make a huge difference. TL;DR: Time to First Byte Matters, when you know what to put into those bytes.
|CloudFlare||KeyCDN||KeyCDN + CE||Decrease Load Time|
I ran even more tests than I showed above and KeyCDN was always faster (even without cache enabler) at every location I tried. So now you should ask yourself, is $1 per month or less on average worth an 15%+ increase in speed? If it isn’t, well then I don’t know why you read this far in my post. I suggest you try out KeyCDN for yourself!
Was this post on a CloudFlare alternative helpful? If so I would love to hear about it below. Or perhaps you have your own experience to share.
GET MORE STUFF LIKE THIS
Marketing, WordPress, Blogging Tips, SEO and Reviews, once a week.
Thank you for subscribing.
Something went wrong.