Best CloudFlare Alternative – Case Study on KeyCDN

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,

Best CloudFlare Alternative – KeyCDN

First, let me explain the differences between CloudFlare and KeyCDN.


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.


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: 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 and Every time CloudFlare says the host is having the issue, but I highly doubt it was a problem.

cloudflare error 522 on

cloudflare error 522 on

cloudflare error 522 on

cloudflare error 522 on

Stumbled across this the other day, CloudFlare breaking CloudFlare?

cloudflare error 525

cloudflare error 525 on

CloudFlare vs KeyCDN Benchmarks

So I ran 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.


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.


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.

cloudflare nginx


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.

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.