Understanding DNS | MLSD #9
Ever wondered how your computer knows where to find google.com? It's like having a phone book for the internet - that's DNS in action!
What is DNS?
DNS (Domain Name System) is essentially the internet's directory service.
It translates human-readable domain names (like www.google.com) into machine-readable IP addresses (like 142.250.183.238). Think of it as a massive distributed database that maps domain names to their corresponding IP addresses.
Why is DNS Important?
Human-Friendly Navigation: Imagine remembering IP addresses for every website you visit! DNS makes the internet accessible by letting us use memorable domain names.
Load Distribution: Through DNS, companies can distribute traffic across multiple servers, improving reliability and performance.
Service Migration: DNS allows services to change their underlying infrastructure without affecting users - they keep using the same domain name.
The Basic Journey (DNS Resolution Flow)
Imagine you type website(like "www.netflix.com") in your browser. Here's what happens:
Step 1: Local Check (Your Local machine like PC/Laptop/Mobile)
Your PC first checks its own memory (DNS cache)
Like checking your recent contacts before searching for a phone number
Step 2: Router Check
If not found locally, asks your home router
Router maintains its own small address book
Step 3: ISP's DNS Resolver (ISP stands for Internet Service Provider)
ISP is a company that provides individuals and businesses access to the internet and related services.
If router doesn't know, asks your ISP's DNS server
Think of ISP's DNS server as a local post office
Step 4: The DNS Hierarchy Search
If ISP doesn't know, starts a search through DNS hierarchy:
Root DNS Servers (like the main index of a library)
TLD Servers (like different sections in the library)
Authoritative DNS Servers (like the specific book shelf)
Implementation resources: github link
References
"DNS and BIND" (5th Edition) Authors: Cricket Liu & Paul Albitz Publisher: O'Reilly Media Year: 2006 ISBN: 978-0596100575
Cloudflare Learning Center - "DNS Reference Architecture" URL: https://www.cloudflare.com/learning/dns/what-is-dns/
RFC 1034: "Domain Names - Concepts and Facilities" Author: P. Mockapetris URL: https://datatracker.ietf.org/doc/html/rfc1034
AWS DNS Documentation "Amazon Route 53 DNS Management" URL: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html
If you found this helpful, give it a like 💚and consider subscribing for weekly insights. Follow me on LinkedIn & X to stay updated.
Have questions or suggestions? Drop a comment below; I’d love to hear from you!


