...

/

Domain Name System

Domain Name System

Learn how domain names get translated to IP addresses through the Domain Name System.

What is Domain Name System (DNS)?

Imagine if you had to remember the phone numbers of all the people you frequently talk to. Alternatively, you can remember their names, and using the phone directory on your smartphone you can store and retrieve their phone numbers. Doesn’t that make your life easy?

On the same note, what if you had to remember 104.18.3.119 instead of educative.io. Because computers understand the unique addresses called IP addresses, and humans are comfortable with domain names; there needs to be a mechanism that converts domain names to IP addresses. Not only that, IP addresses change over time.

DNS is the phonebook of the Internet. DNS single-handedly solves these problems. It is the Internet’s naming service that maps human-friendly domain names to machine-readable IP addresses. It offers a number of advantages other than the resolution of IP addresses. DNS is implemented in the form of a distributed database for the following reasons:

  • Avoid becoming a Single Point Of Failure (SPOF).
  • Achieve low query latency so users can get responses from nearby servers.
  • Get a higher degree of flexibility during maintenance and updates/upgrades (for example, if one DNS server is down or overburdened, another DNS server can respond to user queries).

The service of DNS is transparent to users. When a user enters a domain name in the browser, the browser has to translate the domain name to IP address by asking the DNS infrastructure. Once the desired IP address is obtained, the user’s request is forwarded to the destination web server.

The slides below show the high-level flow of the working of DNS:

How DNS works

The DNS is not a single server that accepts requests and responds to user queries. It is a complete infrastructure with name serversname servers can respond to users’ DNS queries at different hierarchies.

There are mainly four types of servers in the DNS hierarchy:

  1. DNS resolver: resolvers initiate the querying sequence and forwards request to the other DNS name servers. Typically, DNS resolvers lie within the premise of the user’s network. However, DNS resolvers can also cater to users’ DNS queries through caching techniques, as we will
...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy