Authoritative DNS Server VS Recursive DNS Server

Source: Internet
Author: User
Keywords authoritative dns server recursive dns server difference between authoritative and recursive dns server
The Domain Name System (DNS) is the phone book of the Internet. Humans access information online through domain names, such as nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses. DNS converts domain names into IP addresses so that browsers can load Internet resources.
Simple Application Server
USD1.00 New User Coupon
* Only 3,000 coupons available.
* Each new user can only get one coupon(except users from distributors).
* The coupon is valid for 30 days from the date of receipt.

Every device connected to the Internet has a unique IP address, and other computers can use this IP address to find the device. DNS servers do not require humans to remember IP addresses, such as 192.168.1.1 (in IPv4), or more complex new alphanumeric IP addresses, such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).

 How does DNS work?
The DNS resolution process involves converting a host name (such as www.east263.com) into a computer-friendly IP address (such as 192.168.1.1). Every device on the Internet gets an IP address, which is necessary to find the corresponding Internet device-just like using a street address to find a specific home. When a user wants to load a web page, they must translate between the user typing in their web browser (east263.com) and the machine-friendly address needed to find the east263.com web page.

In order to understand the process behind DNS resolution, it is important to understand the different hardware components that DNS queries must pass through. For web browsers, DNS lookups happen "behind the scenes", and no interaction from the user's computer is required except for the initial request.

Loading web pages involves 4 DNS servers:

DNS recursor-The recursor can be considered as a librarian and is required to find a specific book somewhere in the library. DNS recursor is a server designed to receive queries from client computers through applications such as web browsers. Usually, the recursor is responsible for issuing other requests to satisfy the client's DNS query.

Root name server-The root server is the first step in converting (resolving) a human-readable host name to an IP address. It can be thought of as an index to different books in the library-usually it can be used as a reference to other more specific locations.

TLD Name Server-The top-level domain name server (TLD) can be regarded as a specific bookshelf in the library. This name server is the next step in the search for a specific IP address, and it hosts the last part of the hostname (in east263.com, the TLD server is "com").

Authoritative name server-This final name server can be thought of as a dictionary on the bookshelf, where a specific name can be translated into its definition. The authoritative name server is the last stop in the name server query. If the authoritative name server can access the requested record, it will return the IP address of the requested host name to the DNS Recursor (librarian) that made the initial request.

What is the difference between an authoritative DNS server and a recursive DNS resolver?

Both of these concepts refer to servers (server groups) that are inseparable from the DNS infrastructure, but each server performs a different role and is located in a different location within the DNS query pipeline. One way to consider the difference is that the recursive resolver is at the beginning of the DNS query, and the authoritative name server is at the end.

Recursive DNS resolver

Recursive resolvers are computers that respond to recursive requests from clients and spend time tracking DNS records. It does this by issuing a series of requests until it reaches the authoritative DNS name server that requested the record (or timeout or return an error if the record is not found). Fortunately, a recursive DNS resolver does not always need to make multiple requests to track the records needed to respond to the client; caching is a data persistence process that helps by providing requested resource records in advance in DNS lookups Shorten necessary requests.

Authoritative DNS server

In short, an authoritative DNS server is a server that actually holds and is responsible for DNS resource records. This is the server at the bottom of the DNS lookup chain. It will respond with the queried resource record and finally allow the web browser to make a request to access the IP address required to access the website or other web resources. An authoritative name server can satisfy queries from its own data without having to query other sources, because it is the ultimate source of truth for certain DNS records.

It’s worth mentioning that when the query is for a subdomain (such as foo.east263.com or blog.cloudflare.com), an additional name server will be added after the authoritative name server, which is responsible for storing the subdomain’s CNAME record.

There are key differences between many DNS services and those provided by Cloudflare. Different DNS recursive resolvers (providers such as Google DNS, OpenDNS, and Comcast) all maintain data center installations of DNS recursive resolvers. These resolvers allow quick and easy queries through optimized DNS-optimized clusters of computer systems, but they are fundamentally different from the name servers hosted by Cloudflare.

Cloudflare maintains infrastructure-level name servers, which are an integral part of Internet functionality. A key example is a remote server network, where Cloudflare is partly responsible for hosting. F root is one of the root-level DNS name server infrastructure components responsible for billions of Internet requests every day. Our Anycast network puts us in a unique position to handle large amounts of DNS traffic without interrupting service.

What are the steps for DNS lookup?

In most cases, DNS involves translating domain names into appropriate IP addresses. To understand how this process works, it helps to follow the path of DNS lookup when going from the web browser to the DNS lookup process and back again. Let's take a look at these steps.

Note: DNS lookup information is usually cached internally in the querying computer or remotely cached in the DNS infrastructure. DNS lookup usually has 8 steps. When caching DNS information, steps will be skipped from the DNS lookup process, which can be completed faster. The following example outlines all 8 steps when nothing is cached.

8 steps in DNS lookup:

The user types "east263.com" in the web browser, the query will enter the Internet and be received by the DNS recursive resolver.

The resolver then queries the DNS root name server (.).

The root server then responds to the resolver with the address of a top-level domain (TLD) DNS server (such as .com or .net), which stores information about its domain. When searching for east263.com, our request points to the .com TLD.

The parser then makes a request to the .com TLD.

Then, the TLD server responds with the IP address of the domain name server east263.com.

Finally, the recursive resolver sends a query to the domain's name server.

Then, the IP address of east263.com will be returned from the name server to the resolver.

The DNS resolver then responds to the web browser with the IP address of the originally requested domain.

Once the 8 steps of the DNS lookup return the IP address of east263.com, the browser will be able to make a request for the web page:

The browser sends an HTTP request to the IP address.

The server at this IP returns the web page to be presented in the browser (step 10).

What is a DNS resolver?

The DNS resolver is the first stop in the DNS lookup. It is responsible for processing the client that made the initial request. The parser initiates the query sequence, which eventually causes the URL to be converted to the necessary IP address.

Note: A typical uncached DNS lookup will involve recursive and iterative queries.

It is important to distinguish between recursive DNS queries and recursive DNS resolvers. A query refers to a request issued to a DNS resolver that needs to resolve the query. A DNS recursive resolver is a computer that accepts recursive queries and processes the response by issuing necessary requests.

What are the types of DNS queries?

In a typical DNS lookup, three types of queries will occur. By using a combination of these queries, the optimization process for DNS resolution can result in a reduction in travel distance. Ideally, cached record data will be available, allowing DNS name servers to return non-recursive queries.

3 types of DNS queries:

Recursive query-In a recursive query, the DNS client requires that the DNS server (usually a DNS recursive resolver) will respond to the client with the requested resource record, or if the resolver cannot find the record, it will respond with an error message.

Iterative query-In this case, the DNS client will allow the DNS server to return the best answer it can. If the queried DNS server does not match the queried name, it will return a reference to a lower-level authoritative DNS server in the domain name space. Then, the DNS client will query the reference address. This process will continue to use other DNS servers in the query chain until an error or timeout occurs.

Non-recursive query-This usually happens when the DNS resolver client queries the DNS server for the records it has access to, because it is authoritative for the record or the record exists in its cache. Generally, the DNS server will cache DNS records to prevent additional bandwidth consumption and upstream server load.

What is DNS cache? Where does DNS caching happen?

The purpose of caching is to temporarily store data in one location, thereby improving the performance and reliability of data requests. DNS caching involves storing data closer to the requesting client, so that DNS queries can be resolved earlier, and further queries in the DNS lookup chain can be avoided, thereby improving loading time and reducing bandwidth/CPU consumption. DNS data can be cached in various locations, and each location will store DNS records for a period of time, which is determined by the time to live (TTL).

Browser DNS cache

By default, modern web browsers are designed to cache DNS records for a period of time. The purpose here is obvious; the closer the DNS cache is to the web browser, the fewer processing steps must be taken in order to check the cache and make the correct request to the IP address. When requesting DNS records, the browser cache is the first place to check for the requested record.

In chrome, you can go to chrome: // net-internals/ #dns to view the status of the DNS cache.

Operating system (OS) level DNS cache

The operating system-level DNS resolver is the second and last local stop before the DNS query leaves the computer. The process inside the operating system designed to handle this query is often called a "stub resolver" or DNS client. When the stub resolver gets a request from the application, it first checks its own cache to see if it has the record. If not, it sends the DNS query (with recursive flag set) outside the local network to the DNS recursive resolver in the Internet service provider (ISP).

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.