Interview Q&A / Computer Networks

INTERVIEW Q&A · 55 QUESTIONS

Computer Networks interview questions

What happens when you open a website, TCP vs UDP, DNS and HTTP.

  1. How does DNS resolution work, step by step?

    Your device asks a recursive resolver, which checks its cache and, if needed, asks a root server, then the TLD server (like .com), then the domain's authoritative server, which returns the IP address. Every answer carries a TTL, so resolvers and devices cache it and skip most of these steps next time.

    IntermediateIn-depth4 min read
  2. How do Cache-Control and ETag let a browser reuse a response?

    Cache-Control: max-age tells the browser how long it may reuse a response without asking. After that, the browser can revalidate with If-None-Match and the ETag; if nothing changed, the server replies 304 Not Modified with no body.

    IntermediateQuick answer1 min read