CDN Effect on Server Performance

İren Saltalı
May 7, 2019 · 2 min read
Image for post
Image for post

I recently got a new task to do: a web site with bugs which needs to be fixed and updated. This website was developed to meet millions of request in a few days. At first, it doesn’t seem like impossible to do. But the previous developers failed to fix the needs and when a million hit came, the server crashed.

My task here was to bring the updates of the site’s code to the required level in a few hours.

This web site backend was created with .NET MVC and no other structure was used.

Before making any changes on the code, I start to analyze what the problem could be. I found a few things to fix. The first problem is that, all static assets were stored in the web server, from where the web site is published. That means the web server has to deal with serving all of these static files. On the home page there are 53 Javascript files (mostly non-minified), 20 CSS (mostly non-minified), 77 images, 5 media files and 6 font files. Totally 5.9MB. This size and file counts are also another fiasco.

I published this web site to Azure Web App (S1) and tested it by Load Test. The test was 20K users in 5 min to the homepage only. Here are the test results.

Image for post
Image for post
https://irensaltali.com/en/how-much-difference-does-cdn-make/

As seen from this report, 97% of 1.471.257 requests have failed.

When analyzing the details of reasons, I saw most of them are about the “static content”. So, I decided to move these contents to CDN (content delivery network) and a seperate storage and test it again. The tester sent 2.173.109 requests at the same time and 87% of them were successful.

Image for post
Image for post
https://irensaltali.com/en/how-much-difference-does-cdn-make/

Using “CDN” and a “separate storage” for “static assets” have very critical importance on web performance.

That’s it.

I hope this post has helped you.

Originally published at image4.io on May 7, 2019.

image4io

İren Saltalı

Written by

MSc. Computer Engineer. Founder of @noteducom and @image4io, co-organizer in @serverlesstr, Community Builder of @awscloud

image4io

image4io

image4io is an end-to-end SaaS product that optimizes the images of web sites and mobile applications. delivers via multi-CDN and manages the images’ storage in the cloud. So increases the conversion rate and decreases the bounce rate.

İren Saltalı

Written by

MSc. Computer Engineer. Founder of @noteducom and @image4io, co-organizer in @serverlesstr, Community Builder of @awscloud

image4io

image4io

image4io is an end-to-end SaaS product that optimizes the images of web sites and mobile applications. delivers via multi-CDN and manages the images’ storage in the cloud. So increases the conversion rate and decreases the bounce rate.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store