Dashboard/System design/07. Domain Name System

SYSTEM DESIGN · LESSON 7 OF 52 · 6 MIN VIDEO · 2 TOPICS

Domain Name System

Module Progress (0 / 2 Lessons Completed)0%
System design Track (0 / 52 Modules) · Overall 0/80 (0%)0%
⌁

Narrated HD Video Lesson (6 min) · Pro

Lesson Overview + Section #01 + RESHADED Checklist + Quiz #1 are unlocked free below (no login required). Unlock all 80 HD video lessons and deep-dive sections — or watch our two free sample video lessons first.

0% READSec 01/02 · Introduction to Domain Name System (DNS)
SYSTEM DESIGN VIDEO LESSON & GUIDE

Domain Name System

The Domain Name System (DNS) is the globally distributed, hierarchical naming directory that translates human-readable hostnames into routable IP addresses across hundreds of millions of domains at millions of queries per second. Beyond simple name-to-address lookup, production architectures rely on DNS as the Tier-0 traffic controller for regional routing, CDN edge steering, and disaster-recovery failover. In L4-L6 interviews, candidates are expected to understand the exact resolution path, why TTL caching introduces eventual consistency windows during outages, and how Anycast plus UDP keep global lookup latency near 1 ms on cache hits.

WHAT YOU WILL MASTER IN THIS LESSON
  • Trace the control-plane separation between stub resolvers, recursive resolvers, authoritative name servers, and data-plane application traffic
  • Select and configure standard DNS resource records (A, AAAA, CNAME, NS, MX) while avoiding CNAME zone-apex pitfalls and excessive lookup chains
  • Analyze how hierarchical delegation, multi-tier TTL caching, UDP transport, and BGP Anycast balance global scalability against failover staleness
SYSTEMATIC BUILDING-BLOCK CHECKLIST (FROM MODULE 01)

4-Point Infrastructure Primitive Audit

Check off each dimension as you study this building block—interviewers test what it solves, how it works inside, what it costs, and how it fails.

0 / 4 Checked
INTERVIEWER SCORECARD · WHAT MAKES A STRONG HIRE?

5 Signals Bar Raisers Grade (L4 vs. L5 Senior vs. L6 Staff)

Senior (L5 / E5 / Senior SDE) Bar — Autonomous Pacing, Depth & Proactive Trade-Offs: Owns the 45-minute clock without prompting, derives every component quantitatively, surfaces failure modes (hot shards, stampedes, dual writes) BEFORE being asked, and defends consistency vs. latency trade-offs.
1. Scoping
✓ STRONG HIRE SIGNAL

Clarifies users, read/write skew, p99 latency, consistency bounds, and explicit non-goals in minutes 2–8.

✗ NO-HIRE RED FLAG

Jumps straight into drawing load balancers and microservices at minute 2 without asking a single question.

2. Right-Sized Design
✓ STRONG HIRE SIGNAL

Starts with the simplest working architecture justified by the math (e.g., 1 NVMe SQL primary + replicas + Redis for 40 writes/s & 3 TB).

✗ NO-HIRE RED FLAG

Recites a memorized Kafka + multi-DC Cassandra diagram that contradicts their own traffic calculations.

3. Technical Depth
✓ STRONG HIRE SIGNAL

Drives deep into 1–2 hard bottlenecks (partition keys, hot-key mitigation, transactional outbox, KV-cache batching) at minute 27.

✗ NO-HIRE RED FLAG

Skims across 12 boxes at identical buzzword depth and runs out of time before the deep dive.

4. Explicit Trade-Offs
✓ STRONG HIRE SIGNAL

Uses 3-part reasoning: 'A queue here because SMTP spikes to 3 s; checkout stays <60 ms, and we accept eventual email delay + retry dedup.'

✗ NO-HIRE RED FLAG

Name-drops tools ('We put Kafka and ZooKeeper here') without stating the alternative or operational cost.

5. Communication
✓ STRONG HIRE SIGNAL

Thinks aloud every 30–45s, checks alignment at phase transitions, and treats 'What if X fails?' as a cue for where points are awarded.

✗ NO-HIRE RED FLAG

Goes silent for 5 minutes while drawing or defends a flawed assumption defensively when nudged.

ARCHITECTURE & DATA-FLOW SLIDES · SLIDE 1 OF 1Section 01: Introduction to Domain Name System (DNS)
ARCHITECTURE / DATA FLOW DIAGRAM
example.com = 192.0.2.10Browseryour laptopcachedDNS resolverat your providerName serverofficial recordsWeb serverhosts example.com
SECTION 01 OF 2

1. Introduction to Domain Name System (DNS)

★ FREE PREVIEW
Key Takeaway: DNS decouples stable human-facing service names from mutable server IP addresses via typed resource records cached across client and ISP resolvers—operating strictly out-of-band so payload traffic never flows through name servers.
ARCHITECTURE / DATA FLOW DIAGRAM
example.com = 192.0.2.10Browseryour laptopcachedDNS resolverat your providerName serverofficial recordsWeb serverhosts example.com

Decoupling Logical Identity from Network Topology

Internet routers forward packets exclusively by numeric IP headers—32-bit IPv4 addresses such as 192.0.2.10 or 128-bit IPv6 addresses such as 2001:db8::10—whereas users and client SDKs address services by domain names like api.example.com. If mobile apps hardcoded server IPs directly, replacing a failed load balancer, migrating cloud regions, or scaling across multiple edge points-of-presence would require shipping an app binary update to millions of devices. DNS introduces a level of indirection: the client queries a recursive DNS Resolver (operated by an ISP or a public provider like 8.8.8.8 / 1.1.1.1), obtains the current IP from the domain's Authoritative Name Server, and then opens its TCP/TLS connection directly to the target web server.

  • Control-plane isolation: DNS handles only tiny lookup metadata prior to connection establishment; zero HTTP payload bytes pass through the DNS infrastructure.
  • Multi-layer local caching: Both the browser (60-300 s in-memory cache) and OS stub resolver cache resolved IPs, eliminating network round trips entirely on repeat requests.
  • Transparent infrastructure evolution: Operators can swap origin VIPs, insert a CDN, or shift traffic across clouds simply by publishing updated resource records.

DNS Resource Records and Zone Semantics

Authoritative name servers store routing facts as structured tuples called Resource Records (RR), each defined by (Name, TTL, Class, Type, Value). While A and AAAA records terminate a lookup onto concrete IPv4 or IPv6 endpoints, CNAME records alias one hostname to another—commonly used to point www.example.com or static.example.com to a managed CDN hostname (d123.cloudfront.net) whose underlying edge IPs rotate dynamically. NS records glue the DNS hierarchy together by delegating authority for a zone or subdomain to specific name servers, and MX records direct SMTP mail transfer agents with numeric priority preferences.

Record TypeMapping SemanticsExample Record ValueArchitectural Usage & Constraints
AHostname -> 32-bit IPv4 address192.0.2.10Direct VIP mapping; multiple A records enable client/DNS rotation
AAAAHostname -> 128-bit IPv6 address2001:db8::10Dual-stack IPv6 connectivity alongside A records (Happy Eyeballs)
CNAMEAlias hostname -> Canonical nameexample.com. or edge.cdn.net.Requires an extra resolution hop; illegal at zone apex (@) per RFC 1034
NSDomain zone -> Authoritative serverns1.example.com.Delegates authority downward in the DNS tree; deployed in multi-ASN pairs
MXDomain -> Mail exchange host + priority10 mail.example.com.Routes inbound email only; lower priority integer indicates primary server
; Authoritative zone snippet for example.com (Default TTL = 3600s)
example.com.      3600  IN  NS     ns1.example-dns.net.
example.com.      300   IN  A      192.0.2.10
example.com.      300   IN  AAAA   2001:db8::10
www.example.com.  3600  IN  CNAME  example.com.
example.com.      3600  IN  MX     10 mail.example.com.
Interview Signal: Because RFC 1034 forbids placing a CNAME alongside NS and SOA records at a naked root domain (example.com), managed DNS providers implement proprietary ALIAS or ANAME records that resolve the target hostname server-side and synthesize plain A/AAAA responses.
SECTION 02 OF 2

2. How the Domain Name System Works

🔒 PRO SECTION
Key Takeaway: DNS scales to millions of queries per second by partitioning the global namespace into a 3-tier delegated tree (Root -> TLD -> Authoritative), executing iterative lookups from caching resolvers over single-RTT UDP, and replicating critical tiers via BGP Anycast—at the unavoidable cost of TTL-bounded eventual consistency.

Section 1 + Checkpoint Quiz #1 are unlocked free outside the paywall. Unlock all architecture slides, QPS & sharding trade-off tables, and all 80 narrated HD video lessons with Full Access — or inspect our sample payment system lesson first.

ACTIVE RECALL & TRADE-OFF PROBES

System Design Checkpoint Quizzes (1)

CHECKPOINT QUIZ #1

In "Introduction to Domain Name System (DNS)" (DNS Resource Records and Zone Semantics), how does a production-grade design handle "AAAA" (Architectural Usage & Constraints)?