# networking

// [31] real interview questions. Answers and sources live in the practice app.

practice this topic
  1. Walk me through what happens when you type a URL into the browser and press Enter — down to the network level.(mid)
  2. You're adding live video calls to your product. TCP or UDP for the media stream — and why?(mid)
  3. Explain the TCP three-way handshake. Why three messages and not two?(junior)
  4. Walk through the TLS handshake. What does each step accomplish?(mid)
  5. How does DNS resolution actually work, end to end?(mid)
  6. What's the difference between HTTP and HTTPS, and what does HTTPS actually protect against?(junior)
  7. What is NAT, how does it work, and what breaks because of it?(mid)
  8. Latency vs bandwidth — define both, and say which one matters more for a search-as-you-type feature vs a video upload feature.(mid)
  9. Your machine knows the destination IP. How does it figure out the MAC address to actually send the frame to? (Explain ARP.)(mid)
  10. A user types http://yourapp.com but the browser goes straight to HTTPS without ever hitting port 80. What mechanism does that, and why does it matter for security?(senior)
  11. In TLS, how does the client verify it's talking to the real server and not an impostor?(mid)
  12. How does a TCP connection close, and why does one side end up in TIME_WAIT?(mid)
  13. What is a reverse proxy, and why would you put one (nginx, a load balancer) in front of your application servers?(mid)
  14. What is a 304 Not Modified response, and how does HTTP conditional caching work?(mid)
  15. An HTTP request arrives at a web server like nginx or Apache. What happens on the server side before a response goes out?(mid)
  16. TLS uses expensive asymmetric crypto in the handshake but symmetric crypto for the data. Why the hybrid design?(senior)
  17. After the HTML arrives, how does the browser turn it into pixels? (Parse-to-paint pipeline.)(mid)
  18. How does a TCP sender decide how fast it's allowed to send? Explain slow start and congestion control.(senior)
  19. TCP has both flow control and congestion control. What's the difference, and how would you tell which one is throttling you?(mid)
  20. What happens if you send an IP packet bigger than the MTU? Explain fragmentation and path MTU discovery.(mid)
  21. How does traceroute discover the path your packets take? Explain what TTL and ICMP are doing.(mid)
  22. Why does IPv6 exist, and why is IPv4 still everywhere decades later?(junior)
  23. A, AAAA, CNAME, NS, MX, TXT — what does each DNS record type do, and why can't you put a CNAME on the domain apex?(junior)
  24. Layer 4 vs Layer 7 load balancing — what can each see, and when do you actually need which?(senior)
  25. How does a CDN actually make a site faster — and what should you be careful about caching?(mid)
  26. Your web app needs live updates in the browser. Long polling, WebSockets, or Server-Sent Events — how do you choose?(mid)
  27. What is a socket, and how do you see which sockets are open on a machine you're debugging?(junior)
  28. A dependency blips, all your clients retry immediately and keep retrying — now it can't come back up. What's the fix?(senior)
  29. Some sites feel snappy the instant you click a link from Google, as if the page was fetched before you even asked. What browser 'resource hints' let a site pre-do network work ahead of the click, and what does each actually pre-do?(mid)
  30. You're on café wifi and the browser shows a padlock next to the address. What does that padlock actually guarantee against the stranger sitting next to you on the same network?(mid)
  31. You join airport wifi and, whatever site you try to open, the browser suddenly shows a "Login to WiFi" page you never navigated to. What did the network do to your very first request to make that happen?(senior)