Principles of the DNS parsing process

Source: Internet
Author: User
Tags domain name server domain server

The principle and process of DNS parsing.

When a user visits a webpage on our site, he needs to go through the following steps:

1) Find the storage server for this webpage;

2) The server will access the user's request information;

3) The server locates the user request webpage through the file path (URL);

4) The user downloads the content of the webpage to their computer.

The DNS resolution we are talking about is primarily the first step, which is to let the user find the server where the file resides via a URL.

1, why should have DNS parsing?

To make the user's computer and the server (Web-hosting computer) connected is not by the domain name, the network between the computer to achieve connectivity through each computer in the network has a unique IP address to complete. But the IP address is not easy to remember, this needs to be easy to remember the address and the computer can recognize the address between a resolution, the user is easy to remember the address is the domain name, and the DNS server acts as a user request domain name "translated" into the corresponding IP address to facilitate the connection between the computer role.

2 , DNS What is the analytic principle?

DNS resolution mainly has a recursive query, that is, in a DNS server cache to find the corresponding domain name and IP address corresponding relationship, automatically jump to the next step through the next DNS server to find. The following two figures are visible:

3 , DNS What is the parsing process?

DNS parsing process is the focus is also difficult, below I follow my own understanding step by step to explain, there may be errors, please correct me.

The following steps, the DNS cache exists in the domain name corresponding IP DNS resolution is successful, the user's computer will directly access the server, if the DNS server cache does not exist in the domain name corresponding IP, then automatically go to the next step.

1) Browser Cache

When a user accesses a domain name through a browser, the browser will first look in its own cache for the IP address of that domain name (if it has ever visited the domain and has not emptied the cache);

2) System Cache

When the browser cache does not have a domain name corresponding IP will automatically check the user computer system Hosts file DNS cache if there is a corresponding IP domain name;

3) Router Cache

When the browser and the system cache do not have the domain name corresponding IP into the router cache check, the above three steps are the client side of the DNS cache;

4) ISP (Internet service provider) DNS Cache

When the domain name corresponding IP address is not found on the customer service side, it will be queried in the ISP DNS cache. For example, you use a telecommunications network, you will enter the telecommunications DNS cache server to find;

5) ROOT name server

When none of the above is complete, a query is entered into the root server. There are only 13 root name servers, 1 primary root nameservers, and the remaining 12 are secondary root nameservers. When a root domain receives a request, the zone file record is viewed and, if none, the top-level domain name (such as. com) server IP within its jurisdiction is told to the local DNS server;

6) top-level domain name servers

When a top-level domain name server receives a request to view the zone file record, it tells The local DNS server the IP address of the primary domain name server within its jurisdiction;

7) primary Domain Name server

The primary domain server accepts the request and queries its own cache, and if not, goes to the next-level domain name server to find it and repeats the step until it finds the correct record;

8 ) Save the results to the cache

The local domain name server saves the returned results to the cache for the next use, and feeds the results back to the client, which is linked to the Web server via this IP address.

4 , DNS How is optimization implemented?

The general domain name provider or server provider will provide a free DNS service, however, in many cases these free DNS servers are slow, so you can do some optimization, specifically from the following aspects:

1 ) Increase DNS Number of servers

Reduce server pressure, faster when the number of DNS requests that the unit server needs to process is low;

2 ) nationwide distribution of DNS Server

User network access speed and user computer to the distance between the server, if you can give users access to the local province of the server can speed up the DNS resolution;

3 ) Identify the user line feedback corresponding line IP

When the user network line with the server network line is faster, and inconsistent when the slower, such as: The user uses the telecommunications line but the server is connected to the line, which will cause users to visit the site speed down, if you can identify the user access line and feedback corresponding IP will speed up the site access.

Principles of the DNS parsing process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.