Skip to main content

Application Layer

The protocols people and programs actually touch. This module starts with what an application protocol is and how the sockets API hands it a connection, then follows one request through HTTP: its messages, status codes, cookies and caching. It covers how DNS turns a name into an address, how HTTP/1.1, HTTP/2 and HTTP/3 move requests over the wire, and what you reach for when plain request/response is not enough: real-time push, RPC, email, SSH and video streaming.

What you will be able to answer​

  • What makes up an application-layer protocol, and how do client/server and P2P differ?
  • What is the difference between a listening socket and a connected socket, and what does accept() return?
  • What is in an HTTP request and response, and how do the methods differ in safety and idempotency?
  • Which status code do you return for each failure, and what separates 301, 302, 307 and 308, or 401 and 403?
  • How do cookies, sessions and signed tokens differ, and what do the same-origin policy and CORS actually block?
  • How does a name resolve through stub, recursive, root, TLD and authoritative servers, and who controls the TTL?
  • Which DNS record types matter, how do routing policies and failover work, and what do DoH, DoT and DNSSEC each protect?
  • What does HTTP/2 multiplexing fix over HTTP/1.1, and why does head-of-line blocking survive it on TCP?
  • What does QUIC change, and why does HTTP/3 run over UDP?
  • How do Cache-Control, ETag and Vary decide whether a response is reused, and how do you invalidate a cached file?
  • When do you pick polling, long polling, SSE or WebSockets?
  • How do REST, gRPC, GraphQL and webhooks trade off, and which one fits a given API?
  • Why do SMTP, IMAP and SSH matter to firewall rules?
  • How do HLS and DASH use adaptive bitrate to keep a video playing on a changing link?