Enter the URL of the page rendering process experienced

When we entered to be accessed in the browser address bar URL, the browser will analyze the above URL domain name. Enter the DNS resolution process:

Step 1, the browser will check the cache has not been resolved IP address corresponding to the domain name, if there is a cache, the resolution process will end. Browser cache domain is limited, not only the browser cache size is limited, and buffer time is also limited, usually ranging from a few minutes to a few hours, the domain name is cached time limit can be set by TTL property. This cache is too long and too short not good, if the cache is too long, once the domain name is resolved to the IP changes will result in the customer-side caching domain name can not be resolved to an IP address after the change, so that the domain can not be normal resolution, it is possible this time there will be some users unable to access the site. If the time is too short, it can cause the user to be re-parsed each time you visit the site once a domain name.

Step 2. If not, the browser will look for an operating system cache if the user's browser cache DNS domain name corresponding analytical results. In fact, the operating system will have a name resolution process in Windows can be C: \ Windows \ System32 \ drivers \ etc \ hosts file to set, you can use any name resolution to any IP address can access. If you were here a domain name corresponding to the IP address specified, then the browser will be the first to use this IP address. For example, we can resolve a domain name in the test on a test server, without modifying any code so you can test the business logic code on a separate server is correct. It is because of this local DNS resolution procedures, the hacker is likely to put a specific domain name resolution by modifying your domain name resolves to the IP address specified on it, cause these domain name hijacking. This results in earlier versions of Windows there have been very serious problem, but also for users generally do not have much computer knowledge, it is difficult to find the problem, it is difficult to even find themselves, so will Windows 7 hosts file settings become read-only to prevent this file from being easily modified. In Linux, this configuration file is /etc/named.conf, modify this file can achieve the same purpose, when a domain name resolves to the configuration file, the operating system will cache the parsing results in the cache, the cache time the same is the domain name by the expiration time and space cache control.

The picture shows the steps of parsing process.

The third step, if the domain name so far has not been hit, will really request the local domain name server (LDNS) to resolve the domain name, this server is generally somewhere in your city, you will not be very far away, and this server performance is very good, usually cached DNS result, about 80% of domain name resolution here is complete.

Step 4, if LDNS still not hit, it jumps directly to the Root Server domain name server to resolve the request.

Step 5, return to the root name servers LDNS a primary domain name server (gTLD Server, top international domain name server, such as .com .cn .org, etc.) address of the domain being queried.

Step 6, and then sends a request to this time LDNS gTLDs (returned by the previous step).

Step 7, gTLD accept the request and returns the address lookup domain name corresponding to the Name Server, Name Server is the Web site registered domain name server.

Step 8, LDNS sends a request to the Name Server, Name Server to find the target ip according to the mapping table, return to LDNS.

Step 9, LDNS cache the domain name and corresponding ip.

Step 10, LDNS returns the result of the analysis to the user, according to the TTL value in the local cache to the system cache, the domain name resolution process to this end.

After the browser communicates the query to the IP address of the Web server, the communication protocol is the HTTP protocol.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

original:

https://zhidao.baidu.com/question/437513187.html

https://blog.csdn.net/qq_38218238/article/details/82425974

https://blog.csdn.net/aliujiujiang/article/details/81088317

Guess you like

Origin www.cnblogs.com/xjy20170907/p/11613845.html