Front-end performance optimization CDN

It is to cache the static resources of the origin site (pictures and videos, html/css/js installation package apk, etc.) on CDN node servers located in different regions, usually the computer room of the terminal network provider. When users visit the website, they will leave Users can obtain from the nearest CDN server, thus avoiding network congestion, improving access speed, and relieving the pressure on the origin site.

specific process:

1. The user enters the url to be accessed, and the browser obtains the IP address of the CDN load balancing device through domain name resolution (local DNS system and CDN dedicated DNS server).

2. The browser sends access to the CDN load balancer. According to the user's IP address and URL, the browser determines the distance, content, and load situation, and then returns the best cdn cache server IP in the area where the user belongs.

3. The user initiates a request to the cdn cache server, and the server responds to the user request.

4. If there is no content that the user wants on this cache server, the cache server will make a request to the origin server.

5. After the cache server obtains the content from the source server, it caches locally on the one hand, and returns the obtained data to the client on the other hand.

insert image description here

Guess you like

Origin blog.csdn.net/qq_42931285/article/details/124359847