Java Web DNS domain name resolution

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

First, what is DNS

DNS (domain Name System), a distributed database of domain names and IP addresses that are mapped to each other on the Internet, makes it easier for users to access the Internet without remembering the number of IP strings that can be read directly by the machine. The process of obtaining the IP address of the host name through the hostname is called Domain name resolution (or hostname resolution).

Two ways of DNS query

1) Recursive parsing

  The recursive method is shown. The local DNS server is itself responsible for querying to other DNS servers, usually the root domain server of the domain name, and then the root domain server level down query. Finally, the resulting query results are returned to the local DNS server, which is then returned to the client by the local DNS server.

    

2) Iterative Analysis

When the local DNS server itself cannot answer the client's DNS query, it can also be parsed by iterating over the query, as shown in. Instead of querying the other DNS servers themselves, the local DNS server returns the IP addresses of other DNS servers that can resolve the domain name to the client DNS program, and the client DNS program continues to The DNS server queries until the query results are obtained. In other words, iterative parsing only helps you to find the relevant server, and will not help you to check. For example: baidu.com server IP address in 192.168.4.5 here, you check it yourself, I am relatively busy, can only help you here.

            

Third, DNS domain name resolution process

1. First, the browser checks its own DNS cache

2. The browser will look for the operating system cache (local Hosts file)

3, the browser will send the domain name to LDNS (local DNS server , undertook the main domain name resolution work, through Ipconfig can find), LDNS first will query the cache record

4, Ldns server to root server (root name server) request resolution, after iterative resolution, until the root name server returns a GTLD server (primary Domain name server) address.

5, Ldns server to the primary Domain name server (International top-level domain name server , only 13 in the world) request resolution, return name server address ( registered domain name server )

6. The Ldns server makes a request to the DNS server of the domain name, and finally obtains the IP address corresponding to the domain name.

Iv. DNS Load Balancing

When a website has enough users, if each request is on the same machine, the machine may jump off at any time. The workaround is to use DNS load balancing technology, which is the principle of configuring multiple IP addresses for the same host name in the DNS server, and when answering DNS queries, the DNS server will return different parsing results in sequence with the IP address of the host record in the DNS file. Direct client access to different machines, so that different clients can access different servers to achieve load balancing purposes? for example, depending on the amount of load per machine, the distance from the user's location to the machine, and so on.

V. References:

1, salted fish Brother Blog Park Http://www.cnblogs.com/xianyulaodi/p/6547807.html#_label1

2, "in-depth analysis of Java Web Technology Insider" Xilingpo

Java Web DNS domain name resolution

Related Article

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.