DNS (Domain Name System) (DNS)

DNS

The internet's phone book—translates human-readable domain names (example.com) into IP addresses (93.184.216.34). Every CDN request starts with a DNS lookup.

Updated Mar 9, 2026

Full Explanation

DNS is where every web request begins. Your browser asks "what's the IP for cdn.example.com?" and DNS resolves it. For CDNs, DNS is also a traffic steering tool—the CDN's authoritative DNS can return different IPs based on the user's location, server health, or load.

DNS resolution adds latency. A cold DNS lookup can take 20-120ms depending on how many nameservers need to be queried. That's why DNS TTLs matter—longer TTLs mean fewer lookups but slower failover. CDNs typically use short TTLs (30-300s) for their edge IPs to enable fast traffic shifting.

Modern DNS features like EDNS Client Subnet (ECS) let CDN nameservers see the user's approximate location (not just the resolver's location), enabling more accurate geo-routing. Without ECS, a user in Tokyo using Google DNS (8.8.8.8) might get routed to a US PoP because Google's resolver is in the US.

Examples

# Trace the full DNS resolution chain
$ dig +trace cdn.example.com

# Check which CDN edge you're hitting
$ dig +short cdn.example.com
104.16.132.229

# Check DNS response time
$ dig cdn.example.com | grep 'Query time'
;; Query time: 12 msec

# See EDNS Client Subnet in action
$ dig @8.8.8.8 +subnet=103.0.0.0/24 cdn.example.com
# Returns different IP than without subnet

Video Explanation

Frequently Asked Questions

The internet's phone book—translates human-readable domain names (example.com) into IP addresses (93.184.216.34). Every CDN request starts with a DNS lookup.

# Trace the full DNS resolution chain
$ dig +trace cdn.example.com

# Check which CDN edge you're hitting
$ dig +short cdn.example.com
104.16.132.229

# Check DNS response time
$ dig cdn.example.com | grep 'Query time'
;; Query time: 12 msec

# See EDNS Client Subnet in action
$ dig @8.8.8.8 +subnet=103.0.0.0/24 cdn.example.com
# Returns different IP than without subnet

Related CDN concepts include:

  • Zone Apex — The root of a DNS zone, also called the "naked domain" or "apex domain." For …
  • Anycast — A routing technique where the same IP address is announced from multiple locations worldwide. The …
  • CNAME — A DNS record type that maps one domain name to another (an alias). CDNs use …