Best CloudFlare Alternative – Case Study on KeyCDN

cloudflare alternative

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.

CloudFlare

cloudflare alternative - 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

cloudflare alternative

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 PlanKeyCDN
Analytics:Updated every 24 hoursReal time
Edge Cache:Min 2 hourNo restrictions
Raw Logs:Not in Free PlanIncluded
Push Zones:NoneIncluded
Wildcard Subdomain:NoneIncluded
Custom SSL:Not in Free PlanIncluded
Origin Shield:NoneIncluded
Secure Token:NoneIncluded
Max Upload Size:100MBNo Limit
Max Cache Size:512MBNo Limit
Cache Dynamic Content:Not in Free PlanPossible
DDoS Protection:Basic (Edge + Origin)Basic (Edge)
HTTP/2 Support:Fully SupportedFully Supported
Brotli Support:Fully SupportedFully 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.

A single mocha at Starbucks costs me $4.97 while a month of KeyCDN costs me $2.41!

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.

cloudflare error 522 on stackoverflow.com
cloudflare error 522 on stackoverflow.com
cloudflare error 522 on medium.com
cloudflare error 522 on medium.com

Stumbled across this the other day, CloudFlare breaking CloudFlare?

cloudflare error 525
cloudflare error 525 on cloudflare.com

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.

CloudFlare

This test was configured with WP Rocket caching and CloudFlare enabled. On CloudFlare I had “Auto Minify” enabled for Javascript, CSS, and HTML. I also had Rocket Loader enabled.

WebPageTest

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
cloudflare webpagetest
Src: WebPageTest

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.

cloudflare nginx

KeyCDN

I then switched my DNS back and deployed KeyCDN using WP Rocket. All caching settings in the plugin remained the same.

WebPageTest

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
keycdn webpagetest
Src: WebPageTest

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.

WebPageTest

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
keycdn cache enabler webpagetest
Src: WebPageTest

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.

The problem is that it’s not only the time that matters, but also what’s in those first few bytes. If you’re smart, then you first packet (1460 bytes), will  be able to flush just enough of your HTML head to allow the browser to begin the parsing and kick off resource prefetching: JavaScript, CSS, etc.

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 KeyCDNKeyCDN + CEDecrease Load Time
Load Time1.271s1.170s1.117s12.12%
First Byte0.231s0.175s0.204s24.24%
DOC complete1.271s1.170s1.117s12.12%
Fully Loaded1.372s1.261s1.195s12.90%

As you can see running KeyCDN was on average 15.34% faster than CloudFlare!

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!

Get $10 in Free KeyCDN Credits

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.

Brian Jackson

Inbound marketer obsessed with SEO, WordPress, SaaS, and webperf. Want to see your product or service on woorkup? Hire Me

38 thoughts on “Best CloudFlare Alternative – Case Study on KeyCDN

  1. After reading this article, I benchmarked Amazon’s Cloudfront VS. KeyCDN and found them to be around the same across the US.. I would of never thought of this though if it wasn’t for your article Brian, Thanks.

      • Thats a good point, Im currently DNSing through cloudflare but I don’t use their CDN feature as I find it cumbersome as its not easy to clear the cached files nor even tell if its cached at all. I also had issues with their SSL certificate.. but they do now support https/2. Have you implemented https2 on this site or any of your others?

  2. hey Brian, yep, Ive certainly experimented enough with all of this, I see your new solution using cdn and cache enabler, trying it now, finally got my site up to 99% on gtmetrix, but noticed server was still F rating, so, im installed keycdn but still getting F on server, Ill give it some time to get going, then test later, thanks for the great info.

  3. Hey Brian, have ou benchmarked Cloudflare with railgun? I’ve noticed pretty dramatic improvements and some web hosts will offer railgun even on free Cloudflare plans.

    Totally with you on TTFB. All my tests show Cloudflare adding ~200ms to it.

    On another note, does Key CDN cache .php files? For some reason every chat client I’ve found uses a .php to download js and css

  4. Hi Brian,

    Awesome article and I think I am going to use your link to sign up (saving the $10, I assume you get something for this and you deserve it).

    But in any case I did want to mention something about the pricing after I read all the fine print on KeyCDNs site.

    With my personal sites I do not get a ton of traffic like you, at best I am pushing 8 to 10 gigs a month, not a ton of traffic.

    With KeyCNDs pricing page they would have me assume at that rate I would be paying $0.40 a month or a total of $4.80 a year. The details that are missing is that they require you to purchase 29 credits ($1 a credit = $29) for the year.

    The downfall is that all credit expire at the end of the year and there is no rollover. So I would be forfeiting my remaining $20.20 (or in other words, my 20.20 credits)

    Next year I need to re-up my renewal at the 29 credit again (aka $29). So there is a minimum investment here, and don’t get me wrong, I think its TOTALY worth it.

    You can find this piece of information in the FAQ page under the Billing section and the “How much is the minimum payment” link.
    I’m thinking that this price is still worth it at $29 a year. And to be totally fair you can still host other sites under 1 single account (which I plan to do) further using up that 29 (dollars or credit).
    But just don’t think that your going to get KeyCDN for $5 a year.

    • Hey Joe, yes sorry I meant to update that a while back and forget. Yes it is is $29 a year technically or $2.41 a month at the bare minimum. I have updated the post above with that information. But yes, like you said, there is no competitor out there that even comes close to that price. Thanks for the heads up!

  5. I have also run test with cloudflare vs keycdn and noticed keycdn ourperforms cloudflare due to ttfb times (in line with your tests).

    However, with railgun enabled on my vps provider i have found that the performance increase outperforms that of the keycdn setup.

    Have you tried this setup yet?

    • I haven’t tried Railgun yet Jaryl, but unless you have a web host which bundles Railgun, the cheapest plan to get Railgun is $200/month from CloudFlare. That is very expensive! However some hosts do bundle it, just haven’t tried it myself. Thanks for the comment.

  6. Hello Brian, this a great site. I already bookmarked it. What WordPress cache plugin you suggest to use with KEYCDN. At the moment i have premium version of Fastest Cache.Thank you.

  7. I’m going to disagree on this… I tried both services and the difference is negligible (but cloudflare was 4 ms faster to me).

    I am testing a static html file on google pagespeed and I get the “Reduce server response time” for both services (randomly) and I never get it without any cdn service… but I’ll keep using cloudflare because I can offload a lot of traffic to them.

    The main KeyCDN advantage would be for cookieless domains and mobile users… but with http2 this is not relevant anymore.

    • By default, CloudFlare’s CDN does not cache HTML content. HTML updates will show immediately. Only static content like Javascript, images and CSS would be cached by default. So yes you can use WP Cache Plugin along with CloudFlare. Just make sure that you do not cache the wp-admin section and create a page rule to not cache wp-admin section by default using example [dot] com/wp-* string.

  8. Want to share my very peculiar experience with KeyCDN. After joining on a 30 day free trial, I was trying to figure out how to get things up and running on my WP Multisite install using W3 Total Cache. I first emailed them asking for help. They emailed back telling me to submit a support request. I tried that but it was restricted to “paying customers” and I was on Day 1 of the trial. I read through all their “how to” posts and manuals, but nothing explained what I needed to know. So, I joined their “community” site. It said “Everyone is welcome to participate in the community. It doesn’t matter your background, your level of expertise, or whether you are a current KeyCDN customer or not. There will be KeyCDN employees actively participating (including the founders of KeyCDN) in the community and answering any questions you might have about web performance, optimization, and website acceleration.”

    Finding no previous threads addressing my questions, I created my own. I posted some very detailed info on what I had done so far and the error I was getting. The next day, I tried to view my post and it had been deleted! I then tried to log into my account and it too was deleted! I tried to create a new account and it said my IP address had been banned!!! Assuming maybe it was some sort of technical glitch, I joined again from my phone, made another post asking why that had happened and, sure enough, it was also deleted, along with my new account. Yes, they also banned my phone’s IP! I’ve tried repeatedly to reach them to see what the heck was going on and as of the time of this post, I’ve had no reply from anyone – and I’ve tried e-mail, twitter, and facebook.

    So I’m just posting this to make others aware of the service they may expect. Granted, I wasn’t a “paying customer” yet, but I made it very clear that I certainly would be once everything was set up and working properly. I mean, their prices were pretty attractive, so it seemed like a no brainer. I guess you get what you pay for. I would honestly run away from any company that would treat potential customers like this. And I’m doing just that. Too scary to think of what they’d do once I did have all my sites’ content in their hands! Truly a very strange experience to say the least.

  9. I am using CloudFlare for nameservers and KeyCDN for CDN. Should I disable CloudFlare’s caching for best performance? I would like to keep CloudFlare security features, though.

    • Unfortunately in my experience, the slightly higher TTFB with Cloudflare is due to their DNS (if you use their nameservers). So even if you disable their caching, it won’t help performance. However, I am very OCD about TTFB, and you have a lot to gain from the free Cloudflare, such as with security protection. So in my personal opinion it makes up for the slightly higher TTFB. But I personally use KeyCDN on all my projects, not Cloudflare.

  10. is it possible to use KeyCDN and CloudFlate on one website? Official source says yes but how about practical? Will it be a real difference if I use them both? I have a keycdn account + my hosting provider provides free CloudFlare.

    • Yes, you can. KeyCDN has a good article on their knowledgebase about how to use both. However, I probably wouldn’t advise it. I would use one or the other. It is a little complicated and you could actually hurt your performance. (note: your comment was autotagged as spam, I didn’t remove it). Could be Disqus flagged it for some reason.

  11. Hi i am using the free trial of keycdn. And i use it with wp super cache, the paid version. I integrate my cdn url in there but when i do a test with gtmetric there is no cdn. I wonder if this work?

    Even when is the keycdn enabler plugin.

    Any ideas about this?
    Ben

    • Thanks for the update Pat. I did not know that, I will make sure to get the article above updated. That still is only $4/month. Best deal for performance they deliver compared to any other provider.

      • And without notification. But they were fast to send me an email saying that my credits will expire and I need to pay 49 dollars more to keep them.
        Cloudfront is much better for most business with not so high traffic and if you have that high traffic, maybe you are better with a company that does not change the price whenever they want without notification at all.
        Cancelling my accounts at keycdn is my work for the weekend.

        • Thanks for the comment Angel. I do agree you should have got a notification, but you won’t find a better deal or performance anywhere else. Cloudfront is crazy expensive and doesn’t keep up with the latest technology. I care about performance and price. KeyCDN is the best solution the market for that right now.

          • Cloudfront is cheaper if your traffic is not 49$ a year, which is the minimun you will pay to keycdn: 49 credits (for now, they could change that tomorrow again)= less than 100Gb per month on cdn traffic. And 100gb per month could be more than 300k visitors per month.
            So most people wont be on that range ever.
            I am sorry but you are a little biased I think, it is not the cheaper, and as I said, business is a matter of trust, and I do not trust them anymore, so I won´t pay them or recommend them to anyone.

          • Sorry ya, was assuming you were at the $4/month a mark. For me, it comes down to a matter of performance. Have you compared the performance of Cloudfront vs KeyCDN? There is not even a comparison. I totally agree with you about notification, but they have the right to raise their prices. They have the best performance of any CDN on the market right now and $4/month is pretty darn cheap to pay for that. Every business has overhead.

Leave a Comment

32 Shares
Tweet
Share
Share
Buffer