Notes on HTTP Versions, OSI Model, TCP/IP

HTTP/0.9, HTTP/1.0, HTTP/1.1, and HTTP/2 all use TCP as the underlying transport protocol. HTTP/2 brings some optimizations, but it still runs on TCP.

HTTP/3 is a new version of the HTTP protocol that transports over QUIC, which is a transport layer protocol built based on UDP. QUIC was originally developed by Google and intended to replace HTTP/2. Since 2021, most modern desktop browsers support this protocol, except Safari.

HTTP/3 and QUIC are closely related but not exactly the same:

  • HTTP/3 is the latest version of the HTTP protocol that runs on top of QUIC.
  • QUIC (Quick UDP Internet Connections) is the underlying transport protocol for HTTP/3.
    • QUIC is a transport layer protocol.
    • HTTP/3 is an application layer protocol that runs on top of QUIC.

TCP and UDP are both transport layer protocols. TCP is the protocol we use for HTTP up to version HTTP/2. TCP is a secure, reliable protocol that maintains connections between applications. UDP, on the other hand, is connectionless and unreliable; some data might not be delivered. It's faster than TCP due to the lack of error checking and handshaking.

The OSI Model is a conceptual framework (so it doesn't have physical implementation) that describes how communication occurs between devices in a network.

7 layers of OSI, starting from the top, the closest to the end-user:

  • L7 Application Layer - provides services directly to end user - example protocols: HTTP, FTP, SMTP, DNS, WebSocket
  • L6 Presentation Layer - translates data to the right format, e.g., encryption - example protocols: SSL, TLS
  • L5 Session Layer - manages sessions between applications - example protocols: RPC
  • L4 Transport Layer - data transfer - example protocols: TCP, UDP, QUIC
  • L3 Network Layer - routing - example protocols: IP
  • L2 Data Link Layer - example protocols: Ethernet, Wi-Fi
  • L1 Physical Layer - transmits raw bit streams over the physical medium e.g., Ethernet cable, fiber optic, or radio frequencies

The TCP/IP model is a more practical version of the OSI model, more commonly used in the real world:

  1. Application Layer - combines OSI's L7 (Application), L6 (Presentation), and L5 (Session) layers
  2. Transport Layer - same as in OSI L4
  3. Internet Layer - same as in OSI L3
  4. Link Layer - combines OSI L2 (Data Link) and L1 (Physical) layers

Published on October 30, 2024 2 min read