# DNS and CDN — one-pager

BayLearn · System Design Interview Sprint

**Today’s idea:** DNS is the address book for websites. A CDN keeps a saved copy nearby when the same file is useful to many people. Say the hit percent. Do not put money on the CDN.

| Word | Plain meaning |
|------|----------------|
| DNS | Address book. Name → address |
| Three clocks | DNS TTL = old door. CDN TTL = saved copy nearby. 301 = that phone |
| Three doors | DNS = one door. CDN = saved copy nearby. Load balancer = front desk |
| Hit / miss | Already have it nearby / fetch from main server |
| Cache key | What makes two requests the same copy. `?utm=` can ruin the percent |
| Origin | Original files / main server. Lock it |
| 301 | Browsers remember forever. Never for Linkly |

Miss QPS = peak × (1 − hit ratio). 90% is a win. 20% is an extra hop — look at the key.

**Pipes:** 20,000 GET/s × 400 KB ≈ 8 GB/s off origin. At 90% hit ≈ 0.8 GB/s. Photos buy a CDN for pipes. A 200-byte 302 does not.

## Six rows

| Product | CDN? | TTL instinct | Never cache |
|---------|------|--------------|-------------|
| Linkly | Maybe the 302 | 60s, never 301 | Mapping in DNS |
| PulseFeed | Photos yes | Hours + new filename | Private Home |
| RideHail | Tiles maybe | One city door | Live location |
| PayRail | No on money | API door 60s | Capture / authorize |
| ClinicDocs | Clean + ticket | Minutes | Landing files, open bucket |
| TicketDrop | Poster yes | Versioned art | Hold / “seats left” |

A public main server plus a pretty CDN is still public. DNS is not a load balancer.

This is not a hiring prediction tool.
