In this series of posts, I’m going to describe what is CDN and how it works with Episerver. And then introduce a challenge with CDN and cache and Episerver and how we can tackle that. In out first post we will dig into CDN concept and understand what problem it tries to solve. CDN stands for “Content Delivery Network” or “Content Distribution Network”. So CDN is a network which tries to deliver the content to end-user. The source of content is web-server and the output of the CDN will be delivered to the user. The challenges which CDN tries to solve are:
- Take a load of site assets (e.g. Images, Videos, JS, CSS, …) from the web server and cache them. Usually, on first call CDN servers, fetch the assets from the webserver and cache it. From now on it uses cache version and CDN takes the load off from web server
- CDN, as the name says, has a network of MANY servers in different regions which is called “Edge Server”. These servers can improve content delivery to make sure content is going to deliver to end-user using the same server in the same region. This can help website owner to avoid paying for MANY web servers for different region and they will pay much less for expensive compute time (or virtual machine) versus cheap CDN
- Depend on different CDN you would get the different feature but usually, comes with a security feature. Means CDN will handle “DDos Attacks“, Provides PCI Compliance, Web Application Firewall and SSL.
- Most CDN supports content optimization. For example, they can minify JS and CSS on the fly or can optimize image based on the client device (e.g. on small mobile screen the image quality is not important but a size of the image can consume all of your mobile bandwidth).
- Can give your a good analytics about traffic and how to optimize the content delivery to give best experience to end user.
- Compare to compute power we are paying for a web server, CDN is quite a bit cheap.
- Most of CDN providers are now support SPDY and HTTP2, means you can deliver content HEAPS faster to your end-user.
- Some CDNs are supporting video streaming, so if you are providing many videos or event live video, you can rely on CDN to provides high bandwidth in a different region and tackle the complication of video STREAMING mechanism on different end-user devices.
The list above is common CDN features but it is not limited to above list. There are MANY more features from different providers which are not listed but above list is my main concern about CDN and any more feature can help to improve user experience on your site.
In our next part we are going to use cloudflare and one Episerver site to show your how it works.