close

What is CDN?

Content Delivery Network (CDN)

CDN has developed over twenty years since 1998. It is not an innovative technique. However, as continuous innovation progresses, CDN has become an irreplaceable network service. 

Service providers have numerous data center servers in different world regions form a large-scale network environment, offering users the fastest experience in surfing websites worldwide.

If a user queries a request and this query has not been queried before, it means that the response content doesn't exist in a nearby POP node. Hence, the user might need to wait for a while to receive the response. Interestingly, the global distribution node POP (data center server) sent back the response to the user. Simultaneously, it also caches the same content and copies it into a POP node closest to the user. Hence, when other visitors have the same request, the nearest POP will provide the content to achieve a faster response. It is the principle of CDN.

For instance, many years ago, people needed to purchase daily supplies at specific hypermarkets where might far from home. However, there are more and more diversified products sold in convenience stores. Therefore, people can buy daily supplies at nearby convenience stores instead of hypermarkets. This example is similar to the experience that CDN brings to the end-user.

 

CDN Architecture Diagram
CDN Use Cases

CDN Solutions

What problems could be solved by CDN?

  1. Provide the content closest to users’ geographic location to reduce the overall downloading number of times and reduce the latency of reading data.
  2. Prevent servers have heavy loading caused by high access and high bandwidth utilization.
  3. Maintaining continuous availability to ensure that a CDN node's damage would not affect the overall service.
  4. Reduce the workload on the website server. CDN is suited for a high-traffic website that having many visitors at the same time.
  5. Reduce network cost.  The price of CDN traffic is usually lower than that of host network traffic.
  6. Protect the original website IP and reduce the risk of being completely paralyzed by a network attack.
CDN Use Cases
 

How to choose a suitable CDN?

Since CDN services are provided by data center nodes deployed by service providers worldwide, you should observe whether the number of CDN nodes provided by CDN providers is sufficient when choosing CDN services. In addition, the location of the CDN node is a crucial point as well. We should consider where the primary visitor comes from to choose a suitable CDN service.

CDN metrics :

Cloud providers have launched CDN services. Clients are not only considering CDN geographic locations, the cache nodes' function but also should consider the following fundamental indicators:

Delay Time:

It is the period of cache node from receiving the request to returning date to users. The lower latency, the better the performance.

Download Speed:

It is the speed when downloading webpage data from the cache node. The faster the download speed, the better the performance.

Page Speed:

It is the loading speed of accessing a website. A website may contain multiple Html, CSS, js, and other file contents: the faster access the website, the better the performance.

Packet Loss Rate:

It is the cache node ratio of numbers of missing data packets in overall network transmission.

Return-to-origin Rate:

There are two types in the following:

  • The rate of requests: 
    It refers to the proportion of requests from edge nodes for those no-cache, expired cache, unable cache request records. The lower the value, the better the performance.
  • The rate of traffic: 
    It refers to the proportion of the ratio of back-to-origin requests in the overall website traffic. The lower the back-to-source traffic is static content, the better performance.
Cache Hit Rate:

It is the total ratio of the user accessing the cache node of the data that has been cached. The higher the cache hit rate, the better the performance.

What is Static Content & Dynamic Content?

Why is the CDN cost so expensive? Why do you always have so much returning traffic? Above, you should notice what kind of content you use on the website.

Static Content:

The content is based on a fixed source code, such as image, website, album, online movie, blog, etc. These data would be cache to the CDN cache node when the user accesses the website.

Examples of static files:

.gif、.png、.bmp、.jpg、.jpeg、.mp3、.wma、.flv、.mp4、.wmv、.ogg、.avi、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.txt、.pdf、.zip、.exe、.tat、.ico、.css、.js、.swf、.apk、.m3u8、.ts、.ps、.tif、.class、.mid、.webp、.jar…..

Dynamic Content:

The dynamic context is real-time synchronization and real-time interaction with servers and databases, which context needs to be frequently updated with the server and database when users access the website. For example, stock market trading, live broadcast, chat Room, shopping cart system, membership function, etc...), these data would be cached to the CDN cache node with the routed communication with the servers when the user accesses the website.

Examples of dynamic files:

asp, .jsp, .php, .perl, .cgi, api interface, websocket link, dynamic interactive request (post, put, patch)...