Should we use Cloudflare free CDN?

Pranay
May 16, 2020  ·  4192 views
cdn Seo 

Cloudflare provides a free CDN plan. Here is my personal experience on why we should not use cloudflare free plan for all the websites.

I have used the cloudflare free CDN for a while for one of my website developed in ASP.NET MVC. The main purpose of using the CDN is to serve static content of the website quickly based on your geographical location.

How a CDN works?

Image Text

When we hit a website URL in browser, the initial lookup request will be routed to your DNS and then to the cloudflare name servers. These servers will respond with a nearest server IP. This server will validate your request and can do some security checks. Also it can server the cached static files like CSS, javascript, images etc.. For all dynamic data, it will route the request to the original server on which your code exists. In this whole process, the original server on which your resides will just have to serve dynamic content, decreasing the burden on it. Here is a more detailed answer on how cloudflare works

If your website uses a lot of static files like CSS, javascripts and images they will be served by the cloudflare CDNs. This makes your site faster. So it is recommended to use cloudflare CDN when your website has lot of static files.

My experience..

I have a website developed using ASP.NET MVC. ASP.NET MVC has the feature of bundling and minification of CSS and javascript files.So all the CSS and javascript files in my site are bundled and minified. Also, my website does not have any images. So if I use cloudflare, just the minified CSS and javascript files are served from cache. Though there wont be a much difference, I used cloudflare just to have that extra speed. But what i noticed was different. There was no increase in speed but I noticed a message ‘the dns server is busy’ many times. Initially i thought that because of huge traffic my webserver(I was using a shared hosting plan) was not able to serve all the requests quickly. Sometimes I even saw delay in loading my website. It was taking 6 to 20 seconds just to load a simple page sometimes. Though it happened very rare, my average page load time was affected. Few days later I removed the cloudflare CDN for my website. Later on I have never saw that server busy error. Also my average page load time has decreased a lot.

So in my case, cloudflare did not help to increase performance but increased server lookup time. This could be because of multiple server lookups in between you and your web server(server on which your code resides).

Note: My hosting server is located in USA and I used to open my website from India.

This is purely my personal experience and my observations on usage of cloudflare’s free CDN plan. It could be a different case for you. So consider all the scenarios before using the free plan. If you had a different experience then please comment.

AUTHOR

Pranay

A Software Engineer by profession, a part time blogger and an enthusiast programmer. You can find more about me here.


Post a comment




Thank you! You are now subscribed.

Sign up for our newsletter

Subscribe to receive updates on our latest posts.

Thank you! You are now subscribed.