what is cdn cache
cdn allows the traffic or browser that originally accessed the main server to access the cache server deployed nearby for processing. This can greatly reduce the pressure on the main server, and at the same time It can improve user access speed and reduce bandwidth pressure.
The operating environment of this tutorial: Windows 10 system, DELL G3 computer.
To put it simply, cdn allows the traffic or browser that originally accessed the main website server to access the cache server deployed nearby for processing. In this way, the main server can be greatly relieved. pressure, and at the same time can improve the user's access speed and reduce bandwidth pressure.
Generally, websites that require CDN services will choose the following organizational plan:
1. Provide additional CDN services through rented IDC;
2 ..Purchase the services of a professional CDN service provider;
3. Build your own CDN network; the cost will increase accordingly.
The purpose of Cdn design is to achieve load balancing of web content and prevent access request hotspots, delayed responses, etc. It can also be used in game architecture to improve the speed of game access to pull resources.
Features of Cdn:
1, distributed storage,
2, content distribution through intelligent dns resolution or http redirection Load balancing,
3, global load balancing management and content management,
Composition of Cdn:
The functional entities included in the cdn network include It is composed of content caching equipment, content router, CDN content management system, etc.
Content caching: It is a CDN network node, located at the user access point. It is a content providing device for end users and can cache static WEB content and streams. Media content realizes edge dissemination and storage of content so that users can access it nearby.
Content switch: Located at the centralized point of user access, it can balance the load of a single content cache device and perform load-balanced access control on the content.
The content router is responsible for transferring the user's The request is scheduled to the appropriate device, dynamically balancing the load distribution of each content cache site, selecting the best access site for the user's request, and at the same time improving the availability of the website. The content router can develop routing based on a variety of factors, including site and User proximity, content availability, network load, equipment status, etc.
Note: Load balancing is the core of the entire CDN, and the accuracy and efficiency of load balancing will directly determine the efficiency of the entire CDN.
Cdn cache: The cdn cache is a register that temporarily stores network signals. This large number of network request signals will be cached in the cdn database. Then the cdn database will allocate different network request signals based on the current status of the network server, which can make many Idle network servers can also work.
Cdn network structure:
Cdn network is generally divided into center and edge nodes. The center is responsible for global load balancing management. And content management..
Architecture diagram:
Here cdn is divided into layers: In the cdn system, cache devices responsible for providing content services to users are deployed in The entire CDN network is at the edge, so it becomes an edge node.
The central layer of CDN is responsible for global management and control, and at the same time saves the most cache. When the edge layer misses, the central layer will be requested , if the central layer does not hit, it will request data from the source station. If the source station returns it to the central layer, or the central layer itself has corresponding data and returns it to the edge layer, the edge will return it to the user and at the same time it will be local Carry out a cache.
If the system is relatively large and the edge layer requests too much content from the center, a regional node is needed to act as a proxy and be responsible for the management and control of a region.
The working principle of CDN
The CDN network adds a layer of cache between the user and the server. How to guide the user's request to the cache requires the use of dns and the analysis and adjustment of dns. A forwarding of the request.
Rough process: 1. The user requests a domain name, 2. The browser parses the domain name. The detailed dns resolution process will not be explained here. Since cnd has adjusted the domain name resolution process, the domain name obtained through the function parsing library is the domain name after the cname record corresponding to the domain name, so the browser The cname domain name will be accessed again and the IP will be requested. In this process, the global load balancing strategy is used for DNS resolution, which is resolved to the nearest location based on geographical location and other information, allowing users to access it.
3. Obtain the IP address of the cached server, and the browser initiates an access request.
4. After the cache server resolves the request through the dedicated dns inside the cache, it obtains the real IP of the domain name, and then sends the request to the real server. Send a request and request the corresponding data.
5. The origin server sends the response data. After the cache server obtains the data, it caches a copy locally for backup, and then returns a copy to the user to complete the process.
Content distribution technology:
When the origin site needs to distribute content, it can distribute the content to the CDN intermediate source, and then the CDN intermediate source forwards the content to each CDN node. If the CDN node needs to request a certain URL content request, the request will be sent to the CDN intermediate source first. Then the CDN intermediate source actively sends the request content to the origin site, and finally stores the obtained data on the intermediate source and content node, thereby achieving the effect of node acceleration.
It is mainly divided into two methods, active push : The origin server pushes the latest data to each node for updates.
Passive push: Passive access means sending a request to the mirror server when the user accesses it. If there is content on the mirror server, it will be returned directly to the user. If not, go to the server origin site to obtain it and return it to the user.
At the same time, the content on the CDN edge node is not updated in real time. The files are stored in the form of key-value pairs. The key of the key-value pair Usually it is the URL of the file. The value stores the location of the file in the server, or the binary value of the file, and also stores the http header information of the file.
The above is the detailed content of what is cdn cache. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The best registration-free CDN acceleration is Cloudflare. Cloudflare provides global DDoS attack protection and web application security services, which can protect your website from malicious attacks.

How to configure and use CDN for acceleration in Vue In the Vue project, using CDN (ContentDeliveryNetwork) can effectively speed up web page loading and improve user experience. CDN technology distributes static resource files to servers in various locations around the world, allowing users to quickly obtain resources from the server closest to the user, reducing data transmission time and delays. The following will introduce in detail how to configure and use CDN for acceleration in Vue. First, we need to find a

According to this website's report at 16:00 on August 9, Baidu's products have experienced large-scale failures. For example, Baidu Netdisk failed to play videos during use. Users of other businesses also reported that they could not be opened or crashed. After investigation by this site, it was found that the problem was caused by an abnormality in Baidu CDN service. Baidu Netdisk responded that it was very sorry for this problem and was urgently repairing it. Please wait patiently and thank you for your understanding. Five minutes later, Baidu Netdisk responded that the problem was Resolved, please try to log in again, thank you for your support. CDN (Content Distribution Network) distributes the origin site content to acceleration nodes around the world, so that users can be scheduled to the nearest acceleration node when requesting website resources, thus Get the content you need directly and improve users’ access to website resources

With the rapid development of the Internet, website access speed has received more and more attention, and CDN (ContentDeliveryNetwork) is currently one of the most commonly used technologies to accelerate website access. CDN acceleration uses multiple servers distributed in different locations to forward user requests to servers closer to the user to speed up website access. PHP is a commonly used development language in implementing CDN acceleration. This article will introduce how to use PHP to implement CDN acceleration and apply it to actual

Optimize Python website access speed and use static resource acceleration methods such as CDN and browser caching. In today's Internet era, users have increasingly higher requirements for website access speed. A responsive website can provide a better user experience, thereby increasing user stickiness and satisfaction. In Python website development, by using static resource acceleration methods such as CDN (content delivery network) and browser caching, the access speed of the website can be significantly improved. CDN is a distributed server network that stores static resources away from users.

Java code example: Using Alibaba Cloud CDN interface to realize web page acceleration Introduction: In the current era of rapid development of the Internet, web page loading speed has become an important evaluation indicator for users to evaluate a website. In order to improve website access speed and user experience, many websites choose to use web page acceleration services. Alibaba Cloud provides a variety of CDN services and provides the corresponding JavaSDK, which allows us to easily integrate the Alibaba Cloud CDN interface in Java to accelerate web pages. This article will introduce how to use Alibaba Cloud CDN

CDN is the abbreviation of Content Delivery Network, a distributed network architecture that distributes content to server nodes around the world to increase content transmission speed, reduce network latency, reduce server load, improve website reliability, and resist attacks. Architecture, through CDN, users can access the required content more quickly, which improves the user experience and also improves the performance and security of the website.

Encountered a problem: It is very slow for mobile users to access the web server www.osyunwei.com. Solution: 1. Place an nginx reverse proxy server in the mobile computer room. 2. Intelligent resolution through domain name dns. When all mobile users access www.osyunwei.com Resolve to nginx reverse proxy server 3. Dedicated line connection between nginx reverse proxy server and web server. Instructions: 1. Web server line: Telecom IP: 192.168.21.129 Domain name: www.osyunwei.com 2. nginx reverse proxy server line : Mobile system: centos6.2ip: 192.168.21.164vi/e