Fundamentals 17 min read

How HTTP, HTTP/2, and QUIC Power the Modern Web: A Deep Dive

This article explains the fundamentals of HTTP, how browsers build and send requests, the structure of request and response messages, and the performance improvements introduced by HTTP 2.0 and the QUIC protocol built on UDP.

Open Source Linux
Open Source Linux
Open Source Linux
How HTTP, HTTP/2, and QUIC Power the Modern Web: A Deep Dive

HTTP Protocol Overview

HTTP is the first protocol most people use when accessing the web, yet its details are often overlooked. A URL such as http://www.163.com follows a standard format that allows browsers to locate resources via DNS and establish a TCP connection.

Preparing an HTTP Request

The browser resolves the domain name to an IP address using DNS, then establishes a TCP three‑way handshake. Modern HTTP/1.1 connections typically enable Keep‑Alive, allowing the same TCP connection to be reused for multiple requests.

Constructing the HTTP Request

An HTTP request consists of three parts: the request line, header fields, and an optional body.

Request Line

The request line includes the method (e.g., GET, POST, PUT, DELETE), the URL, and the HTTP version. GET retrieves resources, while POST sends data in the body, often as JSON. PUT updates existing resources, and DELETE removes them.

Header Fields

Headers are key‑value pairs that convey important metadata such as Accept-Charset, Content-Type, and caching directives like Cache-Control, Retry-After, and If-Modified-Since. Proper caching reduces server load by allowing clients to reuse unchanged resources.

Sending the HTTP Request

After the TCP connection is established, the request is transmitted as a binary stream. TCP adds its own headers, IP adds source and destination addresses, and Ethernet frames carry MAC addresses. The server receives the packet, acknowledges it, and forwards the data to the HTTP process listening on the appropriate port.

Constructing the HTTP Response

The response also follows a structured format: a status line (e.g., 200 OK or 404 Not Found), response headers (e.g., Content-Type, Retry-After), and an optional body containing HTML, JSON, or other data.

HTTP 2.0 Enhancements

HTTP 2.0 improves performance by compressing headers, splitting messages into binary frames, and multiplexing multiple streams over a single TCP connection, eliminating head‑of‑line blocking and reducing the need for multiple connections.

QUIC: UDP‑Based Transport

QUIC replaces TCP with UDP, using a 64‑bit connection ID to maintain sessions despite IP or port changes, and implements its own retransmission, flow control, and multiplexing mechanisms. This eliminates TCP’s head‑of‑line blocking and allows independent streams to progress without waiting for lost packets.

Remember the core HTTP methods: GET, POST, PUT, DELETE.

HTTP 2.0 uses header compression, binary framing, and multiplexing to boost performance.

QUIC builds on UDP with custom connection, retransmission, multiplexing, and flow‑control mechanisms for even faster web communication.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

TCPHTTPNetworkingQUICHTTP/2UDPWeb Protocols
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.