Computer Networks Interview Questions and Answers

OSI and TCP/IP, HTTP, DNS, routing, TLS and troubleshooting.

Practise 10 random 2 peer-reviewed questions
Computer Networks Interview Syllabus & Preparation Strategy

Whether you are preparing for entry-level Computer Networks interview questions for freshers or senior software engineer interview questions addressing concurrency, scalability, and system architecture, this track provides peer-reviewed model answers with syntax walkthroughs, edge cases, and practical interview tips.

1 Explain TCP congestion control. Hard

TCP congestion control keeps the sender from overwhelming the network. The sender maintains a congestion window, cwnd, and sends at most the minimum of cwnd and the receiver's advertised window.

Classic four phases:

  • Slow start: cwnd starts small and doubles each round trip until the slow-start threshold.
  • Congestion avoidance: cwnd grows by roughly one segment per round trip, additive increase.
  • Fast retransmit: three duplicate ACKs imply one lost segment, so resend it without waiting for a timeout.
  • Fast recovery: halve cwnd and continue.
cwnd ^        /|  AIMD sawtooth
     |      /  |
     |   /     |\__
     +-----------------> time

On timeout cwnd drops to one and slow start restarts. This additive-increase, multiplicative-decrease behaviour is why TCP is fair and stable. Modern algorithms differ: CUBIC uses a cubic growth function, and BBR models bandwidth and round-trip time instead of treating loss as the only signal.

2 How does a CDN improve performance and how would you design for it? Hard

A content delivery network caches content on edge servers close to users, reducing latency and offloading the origin.

How it works: DNS or anycast routes the user to a nearby edge. On a cache miss the edge fetches from the origin or from a parent tier, stores the object according to its cache headers, and serves subsequent requests locally. TTLs, Cache-Control, ETag revalidation and surrogate keys control freshness and purging.

user -> nearest edge -> (miss) -> parent/origin

Benefits are lower round-trip time, less origin bandwidth, resilience to spikes, and absorption of some DDoS traffic. Design considerations include choosing cacheable content, correct cache keys that account for query strings and cookies, an invalidation strategy, and consistency trade-offs. Static assets are easy; dynamic content needs careful rules, edge compute or short TTLs. Always measure cache hit ratio, origin offload and time to first byte.

Frequently Asked Questions About Computer Networks Interviews

What do hiring managers evaluate in Computer Networks technical rounds?

Technical interviewers look for foundational fluency, idiomatic syntax, clarity when communicating complex logic, and awareness of performance trade-offs (e.g. memory footprint, render performance, and network latency) in production environments.

What are the best interview tips for practicing Computer Networks questions?

Use active recall: summarize each answer in your own words before revealing the model solution. Focus on explaining why a certain approach is chosen rather than just memorizing code syntax.