Computer network - DNS and CDN those things


foreword

DNS:
keyword: The domain name is resolved to an IP address.

Domain Name Resolution Protocol (DNS) is used to map host domain names and e-mail addresses that are easy for people to remember to IP addresses that are easy for computers to recognize.
DNS is a c/s structure, the client is used by the user to find the address corresponding to a name, and the server is usually used to provide query services for others. ---Baidu Encyclopedia

CDN:
keyword: nearby, reducing congestion.

The full name of CDN is Content Delivery Network, that is, content distribution network. CDN is an intelligent virtual network built on the basis of the existing network. Relying on the edge servers deployed in various places, through the load balancing, content distribution, scheduling and other functional modules of the central platform, users can obtain the required content nearby and reduce network congestion. Improve user access response speed and hit rate. The key technology of CDN mainly includes content storage and distribution technology. ---Baidu Encyclopedia

1. How does DNS work?

1. DNS hierarchy

The hierarchical structure of DNS domain name servers is divided into: root domain name server, top-level domain name server, authority domain name server, and local domain name server.

2. An example

When the user enters a website domain name in the browser, such as www.baidu.com, the system searches the host file for the IP address corresponding to the domain name and accesses the address. However, the host file cannot record all domain names and their corresponding IP addresses. At this time, the DNS server came into being.

3. The Guts of DNS

The process of converting a domain name to a corresponding IP address is called domain name resolution, and the software that completes this work is called domain name resolver software.
Each resolver is configured on a local name server.

  1. The root domain name server knows all the top-level domain name server IP addresses and provides IP addresses for all top-level domain name servers.
  2. Top-level domain name servers : Both top-level domains and national domains have top-level servers. The top-level server knows all authoritative nameserver IP addresses and provides IP addresses for all authoritative nameservers.
  3. Authoritative name server : All organizations with publicly accessible hosts must provide publicly accessible DNS records, and authoritative name servers store all DNS records.
  4. Local name servers are not part of the DNS hierarchy. Act only as a proxy. Responsible for forwarding DNS requests to the corresponding DNS hierarchy.

4. Next, briefly describe the DNS service process:

Resolver------(Put the specified domain name into the DNS request message)----->Local domain name server-----(Look up in the local database)------->There are: Then deliver directly, replying to the request. None: The local server forwards the request to the root nameserver. ----------->Top-Level Domain Name Servers --------->Authoritative Domain Name Servers.

5. Summary:

  • Repeated query resolution: The process of gradually finding a server that governs a domain name between server levels is called repeated query resolution.
  • The resolver software on the host often requests recursive resolution to resolve a domain name to a corresponding IP address. When a server becomes a client of another server (the domain name in the DNS request report is not found in the local database), it can request repeated resolution, step by step query between server levels each time.

6. By the way, the process of routing and forwarding is attached:

()(Reprinted from Wangdao Computer PubMed)

2. Import CDN from DNS

1. Why is there a CDN?

The most common way to go online is for the browser to access the domain name server through the network, but there are two fatal problems:

  1. Distance problem
    The farther the user is from the server, the slower the access speed
  2. Server stability
    Due to lack of maintenance, small and medium-sized websites are prone to downtime before being discovered for a long time.

2. CDN came into being!

Resolution process:
Add CDN resolution records in the background of DNS resolution settings ----------> CDN network-dedicated server for parsing DNS requests ----------> return CDN load to the browser Balanced server ----------> Find a CDN server in the CDN network that is suitable for providing services to user equipment under all conditions (such as the nearest CDN server) ------> If not, then Continue to search on the upper layer of the CDN network ------> After pulling the resource back, the CDN server that has no record at each layer will do a cache.

3. Advantages of CDN

Advantages: Every time a browser visits a website, it can obtain the corresponding data from the nearest CDN server with cache instead of pulling it from the origin site. This allows users to open a website quickly and additionally prevents downtime. Because one CDN server in the CDN network is down, there are other servers that can work normally.

Guess you like

Origin blog.csdn.net/JingYan_Chan/article/details/122462617