SYSTEM-DESIGN
    intermediate

    DNS Resolution & Caching

    Software Engineer path · lesson 65 of 99

    DNS Resolution Process

    Distributed System
    Step 0/8
    Cache Scenario:
    Resolution Steps
    8
    resolution steps
    Response Time
    100-300ms
    typical latency
    Cache Level
    MISS
    hit location

    Local Machine

    Browser Cache
    OS Cache
    DNS Resolver(ISP / 8.8.8.8)

    DNS Hierarchy

    Root Servers (.)13 root server clusters globally
    TLD Servers (.com)Managed by registry operators
    Authoritative Serverexample.com nameserver

    Scroll right to see full DNS hierarchy

    Browser
    OS Cache
    Resolver
    Hierarchy

    Resolve a domain from scratch

    Sequence

    Order the lookups when nothing is cached yet.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    6. 6Drop a step here
    6 pieces left to place

    Test your knowledge

    21 questions
    Question 1 of 21
    Score: 0

    If a DNS query is a "cache miss" at the OS level, where does the request typically go next?

    The short version

    DNS is the phonebook of the internet. Caching is like saving a number in your contacts so you don't have to look it up in the phonebook every time.

    In more depth

    Domain Name System (DNS)

    DNS translates human-readable domain names (example.com) into machine-readable IP addresses (192.0.2.1).

    The Hierarchy

    1.Root Server (.): Directs resolvers to the appropriate Top-Level Domain server.
    2.TLD Server (.com, .org): Directs resolvers to the Authoritative Name Server.
    3.Authoritative Server: Holds the actual DNS records (e.g., A, CNAME, TXT) for the specific domain.

    Caching

    To reduce latency and server load, DNS results are cached with a Time-To-Live (TTL) at the Browser, OS, and ISP resolver levels.

    Interview Questions

    Google
    Cloudflare
    Amazon
    Amazon
    Cloudflare
    Netflix
    Google
    Datadog
    Stripe
    Cloudflare
    Netflix
    Uber

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required