Search⌘ K
AI Features

Introduction to Domain Name System (DNS)

Define the Domain Name System (DNS) as the Internet’s naming service that translates human-friendly domain names into machine-readable IP addresses. Explore the fundamental concepts of DNS infrastructure, including name servers, resource records, and the importance of caching and hierarchy for scalability.

The origins of DNS

Mobile phones associate a unique number with each user. As contacts grow, we rely on a contact list rather than memory. Similarly, computers are identified by IP addresses (e.g., 104.18.2.119). Because humans cannot easily remember IP addresses for every website, we need a directory to map domain names (like educative.io) to IP addresses. The Domain Name System (DNS) serves as this phone book for the internet.

Using a phone book analogy to understand domain name system (DNS)
Using a phone book analogy to understand domain name system (DNS)

What is DNS?

The Domain Name System (DNS) is a naming service that maps human-friendly domain names to machine-readable IP addresses. This process is transparent to users. When you enter a domain name, the browser queries the DNS infrastructure to translate it into an IP address, then forwards the request to the destination server.

The following slides illustrate the high-level DNS workflow:

The user requests to visit a website by entering its URL in the browser
1 / 7
The user requests to visit a website by entering its URL in the browser

This resolution occurs in milliseconds, minimizing user delay. Browsers also cache frequently used mappings to further improve speed.

AI Powered
Saved
1 Attempts Remaining
Reset
Concurrent DNS requests
Imagine two users enter the same domain name at the exact same time. How does DNS ensure both reach the correct server?

Important details

Key details about DNS infrastructure include:

  • Name servers: DNS is a distributed infrastructure, not a single server. The servers that respond to queries are called name servers.

  • Resource records: The DNS database stores mappings as resource records (RR). An RR is the smallest unit of information requested from name servers. It contains three key fields: type, name, and value.

Common Types of Resource Records

Type

Description

Name

Value

Example (Type, Name, Value)

A

Provides the hostname to IP address mapping

Hostname

IP address

(A, relay1.main.educative.io,104.18.2.119)

NS

Provides the hostname that is the authoritative DNS for a domain name

Domain name

Hostname

(NS, educative.io, dns.educative.io)

CNAME

Provides the mapping from alias to canonical hostname

Hostname

Canonical name

(CNAME, educative.io, server1.primary.educative.io)

MX

Provides the mapping of mail server from alias to canonical hostname

Hostname

Canonical name

(MX, mail.educative.io, mailserver1.backup.educative.io)

  • Caching: DNS employs caching at multiple layers to reduce request latency and alleviate load on the global infrastructure.

  • Hierarchy: DNS name servers are organized hierarchically. This tree-like structure ensures scalability as the number of domains and query load increases.

We will explore the hierarchical structure and management of the DNS database in the next lesson.