CDN from Scratch (1) About Content Delivery Network

0、Foreword

As of the publication of this article, this website has been fully distributed using CDN. Domestic China Mobile, China Telecom, and China Unicom have resolved to more than 10 CDN servers in the Asia-Pacific region. Overseas (including Hong Kong, Macao, and Taiwan) have resolved to Cloudflare's preferred IP. Currently, the domestic CDN homepage can be tested. It has an excellent result of 0.48s, and the speed test result abroad can even reach 0.35s.

Therefore, this series of articles will explain everything I know about CDN, including selection, access, configuration, caching, back-to-origin, etc., and even complex techniques such as integrating CDN.

So, what is CDN?

1 Introduction

The full name of CDN is Content Delivery Network or Content Distribution Network, which is content distribution network. CDN is an intelligent virtual network built on the existing network. It relies on edge servers deployed in various places and uses the load balancing, content distribution, scheduling and other functional modules of the central platform to enable users to obtain the content they need nearby and reduce network congestion. Improve user access response speed and hit rate.

2. Classification

According to CDN node type, it can be divided into:

  1. FCDN: A CDN network that uses dedicated nodes as CDN nodes;
  2. ICDN: A CDN network that uses Internet backbone nodes as CDN nodes;
  3. ECDN: CDN network within the enterprise, used to accelerate network access within the enterprise;
  4. TCDN: CDN network based on P2P technology, which improves access speed through sharing between users;
  5. ACDN: CDN network based on cloud computing technology, providing CDN services through cloud computing resources;
  6. HCDN: A CDN network based on hybrid cloud technology that combines public cloud and private cloud to provide CDN services;
  7. PCDN: A CDN network that uses edge nodes as CDN nodes.

Generally speaking, the CDN we discuss refers to FCDN.

According to the needs of the following explanation, I can also make the following classifications——

Note:
The following categories are all personal opinions. If you have different opinions, please communicate in a friendly manner in the comment area.

According to usage, they are divided into:

  1. Accelerated CDN: Generally speaking, using multiple servers (or multiple clusters) in multiple locations as CDN nodes generally results in poorer defense but faster speed;
  2. Defense CDN: Generally refers to using a high-defense IP in a specific region (for example, the same region as the server) as a CDN node, which has higher defense and some will have WAF function.

You can think of Cloudflare as having the characteristics of both CDNs.

According to the source, they are divided into:

  1. Pure CDN: Using a single CDN network to provide CDN services instead of using multiple CDN networks to mix or merge; usually provided by one CDN provider.
  2. Hybrid CDN: This refers to both converged CDN and hybrid CDN. Hybrid CDN (Hybrid CDN) refers to the integration or mixed use of multiple CDNs to achieve better performance and effects, while Hybrid CDN (Multi-CDN) refers to using the services of multiple CDN providers to distribute content. to improve reliability and performance. There is not much difference between the two, so we use "fusion CDN" to refer to them below.

The CDN currently used by Qingbei Technology is a converged CDN.

According to the main regions, it can be divided into:

  1. Global CDN: There are close nodes all over the world;
  2. Regional CDN: Requests from all over the world are distributed to nodes in the same region.

If a converged CDN uses regional CDNs from each region at the same time, it can be considered a global CDN.

3. Purpose

There are bottlenecks in CDN performance tuning. For example, an overseas (even on the edge of mainland China, such as Hong Kong, Taiwan, and Tokyo) CDN that is tuned to the extreme may not even be as fast as the CDN node closest to you in China, even if it is not. Not well tuned.

Therefore, if you use domestic CDN or global CDN, it is recommended to only refer to the cache and other configuration contents in this article, and do not pay too much attention to speed and performance tuning.

If you use a CDN such as Cloudflare to relay "online" nodes, this is a behavior that I don't really agree with and will not be introduced in this series of articles.

If you use CDN to bypass registration blocking, you can find various possible methods and clues in this series of articles and even other articles on this site. At present, all the team's websites have successfully bypassed blocking using similar methods.

With the above clear, let’s get started!

CDN from Scratch (1) About Content Delivery Network

https://blog.tsinbei.com/en/archives/759/

Author
Hsukqi Lee
Posted on

2023-11-19

Edited on

2023-11-19

Licensed under

CC BY-NC-ND 4.0

Comments

Name
Mail
Site
None yet