...

>

How the Domain Name System Works

How the Domain Name System Works

Learn how the Domain Name System hierarchy works, detailing the roles of resolvers, root, TLD, and authoritative servers. Explore iterative and recursive methods for query resolution. Understand how caching and distributed architecture ensure DNS scalability, reliability, and eventual consistency.

This lesson addresses the following questions:

  • How is the DNS hierarchy structured?

  • How does caching reduce the load on the DNS infrastructure?

  • How does the distributed nature of DNS improve robustness?

DNS hierarchy

DNS is not a single server. It is a vast infrastructure comprising name serversname servers can respond to users’ DNS queries organized in a hierarchy.

There are four main types of servers in this hierarchy:

  1. DNS resolver: Initiates the query sequence. Resolvers are typically located within the user’s network (e.g., ISP or local network). They often cache results locally to answer future queries, serving as the default server for users.

  2. Root-level name servers: The entry point of the hierarchy. These servers direct requests to the appropriate top-level domain (TLD) servers (e.g., .com, .edu). For example, a request for educative.io prompts the root server to return a list of .io TLD servers.

  3. Top-level domain (TLD) name servers: These servers maintain the IP addresses of authoritative name servers. They provide the querying party with the location of the organization’s specific servers.

  4. Authoritative name servers: The final destination. These servers belong to the organization and provide the actual IP addresses for the requested web or application servers.

DNS hierarchy for the resolution of domain/host names
DNS hierarchy for the resolution of domain/host names
...