Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the difference and connection between DNS and CDN

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the differences and connections between DNS and CDN". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the difference and relationship between DNS and CDN?"

Nowadays, many Internet users can't understand the relationship between CDN and DNS. What's the difference between them? There is always a vague concept of the two. In fact, the two complement each other, and the combination of the two can make the website safer and faster.

The process for users to visit a website that does not use CDN caching is as follows:

The user provides the domain name to be accessed to the browser

The browser queries the local DNS for the IP address of the domain name.

The local DNS initiates a request to 13 roots

The root server returns the first-level server to the local server

The first-level server returns the authorized authoritative DNS to the local DNS, and the authoritative DNS server sends the IP address to the local DNS parsing server as the resolution result.

The local DNS resolution server returns the IP address to the user, thus completing a resolution process

After using the CDN cache, the access process of the website is as follows:

The user provides the domain name to be accessed to the browser

The browser calls the domain name resolution library to resolve the domain name. Because CDN adjusts the domain name resolution process, the resolution function library generally gets the corresponding CNAME record of the domain name. In order to get the actual IP address, the browser needs to resolve the obtained CNAME domain name again to get the actual IP address. In this process, the global load balancing DNS parsing is used, such as parsing the corresponding IP address according to the geographical location information, so that the user can access it nearby.

This resolution obtains the IP address of the CDN cache server. After getting the actual IP address, the browser sends an access request to the cache server.

According to the domain name to be accessed by the browser, the cache server obtains the actual IP address of the domain name through Cache internal private DNS resolution, and then the cache server submits an access request to the actual IP address.

After the cache server gets the content from the actual IP address, on the one hand, it saves it locally for later use, and on the other hand, it returns the obtained data to the client to complete the data service process.

After the client gets the data returned by the cache server, it displays it and completes the whole data request process of browsing.

The main technical means to realize CDN are cache and mirror server. Can work in DNS parsing or HTTP redirection to transfer and synchronize content through Cache servers or remote mirror sites

The CDN network architecture is mainly divided into two parts: the center and the edge. The center refers to the CDN network management center and the DNS redirection analysis center, which is responsible for the global load balancing, the equipment system is installed in the computer room of the management center, and the edge mainly refers to remote nodes, the carrier of CDN distribution, which is mainly composed of Cache and load balancer.

When a user visits a website that joins the CDN service, the domain name resolution request will eventually be handed over to the global load balancer DNS for processing. Through a set of pre-defined policies, the global load balance DNS provides the node address closest to the user at that time to the user, so that the user can get fast service. At the same time, it also maintains communication with all CDNC nodes distributed around the world, collects the communication status of each node, ensures that user requests are not allocated to unavailable CDN nodes, and actually does global load balancing through DNS.

Each CDN node consists of two parts: a load balancing device and a cache server

The load balancing device is responsible for the load balancing of each Cache in each node to ensure the work efficiency of the node; at the same time, the load balancing device is also responsible for collecting the information between the node and the surrounding environment, maintaining communication with the global load DNS, and realizing the load balancing of the whole system.

Many users want their IP not to be exposed, because simply using DNS parsing, the direct PING will show their real IP. If you use CDN,PING again, the IP is not the user's real IP but the IP node of the CDN server, resulting in an idea that DNS is completely useless, as long as you use CDN, because being attacked is not your real IP. This idea is actually completely wrong.

CDN service itself does not have DNS parsing function, but relies on DNS intelligent parsing function. DNS intelligently allocates the most suitable CDN service node according to the location and line of the user, and then returns the static cache content cached in the service node to the user. Therefore, when the ping query is performed after CDN is enabled, the IP changes because what is returned is the best CDN service node IP and the real server obtained by our DNS according to the intelligent adaptation of the user's network and server conditions.

At this point, I believe you have a deeper understanding of "what is the difference and relationship between DNS and CDN". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report