system-design-primer
reference — getting there

Domain name system

in short — written for this site
Translates a domain name to an IP address — a hierarchical, heavily cached lookup before any request is made.
record types
NS points at a name server for the domain. MX at a mail server. A maps a name to an IPv4 address, AAAA to IPv6. CNAME points one name at another name or at an A record.
routing
Weighted round robin can prevent traffic going to servers under maintenance and balance across cluster sizes. Latency-based routing sends the client to the nearest region. Geolocation-based routing decides by the origin of the request.
cost
Accessing a DNS server introduces a slight delay, and DNS server management is complex and generally managed by governments, ISPs and large companies. DNS services have recently come under DDoS attack.
from the primer — full sectionsynced
Source: DNS security presentation
Source: DNS security presentation

A Domain Name System (DNS) translates a domain name such as www.example.com to an IP address.

DNS is hierarchical, with a few authoritative servers at the top level. Your router or ISP provides information about which DNS server(s) to contact when doing a lookup. Lower level DNS servers cache mappings, which could become stale due to DNS propagation delays. DNS results can also be cached by your browser or OS for a certain period of time, determined by the time to live (TTL).

  • NS record (name server) - Specifies the DNS servers for your domain/subdomain.
  • MX record (mail exchange) - Specifies the mail servers for accepting messages.
  • A record (address) - Points a name to an IP address.
  • CNAME (canonical) - Points a name to another name or CNAME (example.com to www.example.com) or to an A record.

Services such as CloudFlare and Route 53 provide managed DNS services. Some DNS services can route traffic through various methods:

Disadvantage(s): DNS

  • Accessing a DNS server introduces a slight delay, although mitigated by caching described above.
  • DNS server management could be complex and is generally managed by governments, ISPs, and large companies.
  • DNS services have recently come under DDoS attack, preventing users from accessing websites such as Twitter without knowing Twitter's IP address(es).

Source(s) and further reading

sourcedonnemartin/system-design-primer / README.mdanchor#domain-name-systemsyncedsynced from donnemartin/system-design-primer@master · 2026-08-16