Tech News
← Back to articles

Cloudflare Is Not a CDN

read original related products more articles

I love Cloudflare. I’ve always been a fan of their service and their generous free plan, which they’ve never backtracked from. They still offer unlimited bandwidth with very few limitations. Users have stories about serving terabytes of data per day without Cloudflare knocking on their door to upgrade.

We, too, use Cloudflare under the hood, which enables us to offer unlimited bandwidth for our users as well.

This might make people wonder: Why pay for a CDN when Cloudflare is free? When I started using Cloudflare, I thought that too.

But when you compare it to a traditional CDN, Cloudflare does have a few shortcomings:

1. Unreliable Caching Policies

With a traditional CDN, if you set cache-control header, you can be sure that your files will be cached on the edge according to the header.

Cloudflare does respect the cache-control headers, but not always. I have served files with public, max-age=31536000, immutable header, and it still results in cache-miss, even when the request comes from the same location and edge.

Cloudflare is able to offer unlimited bandwidth because they have peering arrangements with large number of ISPs and hosting providers. They help providers save T1 bandwidth cost by caching the most frequently resources at their edge servers. ​

Naturally, they can’t cache every file indefinitely. Considering their free plan, the storage costs would be astronomical. I suspect that Cloudflare caching heavily depends on the frequency of the requests for the file. So, if a file hasn’t been requested in a while, it gets purged from the cache, irrespective of what the headers with which it was served with.

2. Unreliable Latency

... continue reading