当前位置:网站首页>Understand CDN
Understand CDN
2022-07-28 08:23:00 【Wu Xuan (operation and maintenance is also about fun!)】
Definition : cdn(Content Delivery Network) Content based distributed distribution network .
What is? cdn Service? , Simply speaking , It is to let the original access to the traffic or browser of the master server , Go to the cache server deployed near him to handle , such , It can greatly reduce the pressure on the main server , And at the same time, it can improve the access speed of users , Reduce the pressure of bandwidth .
Generally need cdn The service website will choose the organization scheme :
Through rented IDC Provide additional CDN service ;
2.. Buy professional CDN Service provider's service ;
3. Set up your own CDN The Internet ; The cost increases in turn .
Cdn The purpose of design is to realize web Load balancing of content , Prevent access request hotspots , Delayed response , , etc. , It can also be used in game architecture , Improve the speed of game access and pull resources .
Cdn Characteristics :
1, Distributed storage ,2, Through intelligent dns Parse or http Redirection realizes load balancing of content distribution ,3, Global load balancing management and content management ,
Cdn The composition of :
cdn The functional entities included in the network include content caching devices , Content router ,cdn Content management system, etc ,
Content caching : by CDN Network nodes , At the user access point , It's a content delivery device for end users , Cacheable static WEB Content and streaming content , Realize the edge propagation and storage of content , So that users can visit nearby .
Content switch : At the user access point , It can balance the load of a single point of view content caching device , And load balancing access control for content .
The content router is responsible for scheduling users' requests to the appropriate devices , Dynamically balance the load distribution of each content cache site , Choose the best access site for the user's request , At the same time to improve the usability of the website , Content routers can make routes based on many factors , Including the proximity between the site and users 、 Availability of content 、 Network load 、 Equipment condition, etc .
Be careful : Load balancing is the whole cdn At the heart of , The accuracy and efficiency of load balancing will directly determine the whole cdn The efficiency of .
Cdn cache : cdn Cache is a register that temporarily stores network signals , stay cdn This large number of network request signals will be cached in the database , then cdn The database will be based on the current status of the network server , Allocate different network request signals , This will enable many idle network servers to work ,.
Cdn Network structure :
Cdn The network is generally divided into central and edge nodes , The center is responsible for overall load balancing management and content management ..
Architecture diagram :

here cdn Divide the levels : stay cdn In the system , Responsible for providing content services to users cache Devices are deployed throughout cdn The Internet I edge , So it becomes an edge node .
Cdn The central layer of is responsible for the overall management and control , At the same time, it saves the most cache, When the edge layer misses , The central layer will be requested , If the central layer also misses, request data from the source . If the origin station returns to the central layer , Or the central layer itself has corresponding data returned to the edge layer , The edge will be returned to the user and a cache will be made locally .
If the system is relatively large , The edge layer requests too much content from the center , You need area nodes , Acting as agent , Responsible for the management and control of an area .
CDN How it works
Cdn The network adds a layer between users and servers cache, How to guide the user's request to cache On , Then we need to use dns, adopt dns The parsing adjustment of the request is a forwarding .
General process : 1, The user requests a domain name , 2, The browser resolves the domain name , Here's the details dns The parsing process is not elaborated , because cnd The domain name resolution process has been adjusted , Through the function analysis library, we get the corresponding cname Record the domain name after , So the browser will be right again cname Domain name to access , request ip, In the process , Use the global load balancing strategy dns analysis , Among them, according to the geographical location and other information, it is analyzed to the nearest location , Let users access it .
3, Get cached server ip Address , The browser initiates an access request ,
4, The cache server passes on request cache Internal dedicated dns After the parsing , Get the authenticity of the domain name ip, Then send a request to the real server , Request the corresponding data ,
5, The origin server sends response data , After the cache server gets the data , Cache a backup locally , Then return a copy to the user , Complete the process .
Content distribution technology :

When the source site needs to distribute content , You can distribute the distribution to CDN Intermediate source Again by CDN The intermediate source forwards the content to each CDN node If CDN The node needs to request a URL When content is requested , The request will be sent to CDN Intermediate source Again by CDN The intermediate source actively sends the request content to the source station , Finally, the acquired data is stored on the intermediate source and content node , So as to achieve the effect of node acceleration .
There are mainly two ways , Take the initiative to push : The origin server pushes the latest data to each node , updated .
Passive push : Passive access is when users visit , Send a request to the mirror server , If there is content on the mirror server , Just go back to the user , without , Get it from the server source station and return it to the user .
meanwhile cdn The content on the edge node is not updated in real time , Files are stored as key value pairs , Key value pairs key Usually file url, Value saves the location of the file in the server , Or binary value of the file , At the same time, the file is saved http Header information .
边栏推荐
- EMC design strategy - clock
- Change the dataDir path after mysql8.0.16 installation
- 辨析覆盖索引/索引覆盖/三星索引
- GD32使用ST的HAL库和GD官方库的一些体会
- 谈谈DOM0,DOM1,DOM2,DOM3
- Google and Stanford jointly issued a document: why do we have to use large models?
- 快速搭建DMHS DM之间双向同步
- Use ffmpeg to generate single image + single audio streaming video in batches
- 聊一聊数据库的行存与列存
- [Google] solve the problem that Google browser does not pop up the account and password save box and cannot save login information
猜你喜欢

MPLS --- 多协议标签交换技术

Plantuml Usage Summary
C language explanation series - array explanation, one-dimensional array, two-dimensional array
![[leetcode] 24. Exchange nodes in the linked list in pairs](/img/06/af8cffd306777b14a4989e638f5866.png)
[leetcode] 24. Exchange nodes in the linked list in pairs

Flowable workflow all business concepts

登录模式:单一服务器模式、单点登录、token模式

GD32使用ST的HAL库和GD官方库的一些体会

Matplotlib绘图笔记基础直线、折线、曲线

OSPF comprehensive experiment (7.12)

演讲笔记 适合所有人的实用程序生成 PCG
随机推荐
【青鸟学员故事】追风少年“李晓亮”
Opentsdb time series database
Understanding of spark operator aggregatebykey
华为高级工程师---BGP路由过滤及社团属性
Talk about row storage and column storage of database
Mechanical revolution Jiaolong P wired network card driver can't play
Fxksmdb.exe process description
记录一次mycat连接Communications link failure问题解决
EMC design strategy - clock
基于单例模式的yaml参数配置
Near infrared two region agzs quantum dots wrapped deoxyribonucleic acid dna|dna agzsqds (Qiyue)
A group of South University students rely on science and technology to go to sea, with an annual income of 1billion
Swm32 series tutorial 5-adc application
Chairman tree review
DNA modified noble metal nanoparticles | DNA deoxyribonucleic acid modified metal palladium Pd nanoparticles pdnps DNA
PCB design skills of EMC
JUC atomic class: CAS, unsafe, CAS shortcomings, how to solve ABA problems in detail
js卡通英文字母打字小游戏源码
Freezing and thawing of pytoch
Some experience of gd32 using Hal Library of ST and Gd official library