Interview Q&A / Computer Networks
Computer Networks interview questions
What happens when you open a website, TCP vs UDP, DNS and HTTP.
Prefer rapid revision? Practise Computer Networks short interview answers →
- What are the common HTTP methods and status codes, and what does idempotent mean?
GET reads, POST creates or triggers an action, PUT replaces, PATCH partly updates and DELETE removes. A method is idempotent if repeating the same request leaves the server in the same state as doing it once - GET, PUT and DELETE are, POST is not. Status codes are grouped as 2xx success, 3xx redirect, 4xx client error and 5xx server error.
BeginnerIn-depth5 min read - What happens when you type a URL in the browser and press Enter?
The browser finds the server's IP address with DNS, opens a TCP connection, sets up TLS for HTTPS, sends an HTTP request, gets a response and then parses and renders the HTML, CSS and JavaScript into the page you see.
BeginnerIn-depth3 min read - What is the difference between HTTP and HTTPS, and what does TLS actually do?
HTTPS is HTTP sent inside a TLS connection. TLS gives three things plain HTTP lacks - encryption so others on the network cannot read the data, integrity so it cannot be changed in transit, and authentication through a certificate so you know you are talking to the real site.
BeginnerIn-depth4 min read - What is the difference between TCP and UDP?
TCP is connection-based and reliable, with ordering, retransmission and flow control, so it suits web pages, email and file transfer. UDP just sends datagrams with no guarantees, so it is faster and lighter and suits video calls, games, DNS and live streaming.
BeginnerIn-depth3 min read - What is the OSI model, and how is it different from the TCP/IP model?
The OSI model is a 7-layer reference model (Physical, Data Link, Network, Transport, Session, Presentation, Application) used to explain and troubleshoot networks. The TCP/IP model is the 4-layer model the internet actually runs on (Link, Internet, Transport, Application), which folds OSI's top three layers into one.
BeginnerIn-depth4 min read