Ref: https://learn.cantrill.io/courses/2022818/lectures/45637092

YouTube: https://www.youtube.com/watch?v=xf01fJQsagQ


DNS flow when typing “www.netflix.com” in your browser

Untitled

  1. Your machine checks your local cache and your Hosts file
    1. If valid* IP address for www.netflix.com is stored inside → browser queries the IP address (overrides any DNS request)
    2. If valid* IP address not found, go to 2.
  2. Query DNS Resolver
  3. Resolver checks its local cache
    1. If valid* IP address for www.netflix.com is stored inside → return IP address to client
    2. If valid* IP address not found, go to 4.
  4. We start to walk the DNS tree: Resolver queries Root Zone, asking for IP address of www.netflix.com
  5. Root Zone doesn't have that IP address, but returns IP address for .com NS to resolver
  6. Resolver queries .com TLD's NS for IP address of www.netflix.com
  7. .com TLD doesn't have that IP address, but returns IP address for netflix.com NS to resolver
  8. Resolver queries netflix.com NS for IP address of www.netflix.com
  9. netflix.com NS returns IP address for www.netflix.com to resolver (🎉 finally!!)
  10. Resolver caches the result locally
  11. Resolver returns IP address for www.netflix.com to client
  12. Client caches the result locally
  13. Client's browser queries the IP address for www.netflix.com