Skip to main content
Primitives/Primitive #19
PRIMITIVE #19Core Distributed Systems Component

API Protocols — HTTP/1.1 vs. HTTP/2 vs. HTTP/3 (QUIC) vs. gRPC

AWS Production Mapping:CloudFrontWAF

1. What It Is & Why It Exists

The Core Problem: Network Inefficiency & Head-of-Line Blocking

In modern distributed systems and web architectures, network transport efficiency directly dictates user perceived latency, server thread utilization, and bandwidth costs:

  1. HTTP/1.1 Inefficiencies: Textual wire format with verbose, uncompressed headers. Concurrency requires opening multiple TCP connections (browsers open up to 6 per origin). Suffers from Application-Layer Head-of-Line (HOL) Blocking—a slow request blocks all subsequent requests on that TCP connection.
  2. HTTP/2 Breakthroughs & Transport HOL: Introduced binary framing, stream multiplexing over a single TCP connection, and HPACK header compression. However, because it runs on single-stream TCP, a single lost packet blocks all multiplexed streams until TCP retransmits and reorders the packet (Transport-Layer HOL Blocking).
  3. HTTP/3 & (UDP): Eliminates Transport HOL blocking by running over UDP. Each multiplexed stream is independent. Combines the transport handshake and TLS 1.3 cryptographic handshake into a single roundtrip (1-RTT1\text{-RTT} or 0-RTT0\text{-RTT} connection resumption) and provides native Connection Migration across network switches (e.g., Wi-Fi to 5G cellular).
  4. & Protocol Buffers: High-performance, strongly-typed Remote Procedure Call (RPC) framework built on HTTP/2 or HTTP/3 transport using Protobuf binary serialization, bi-directional streaming, and client/server code generation.
Interactive Architecture Diagram
Synthesizing vector architecture diagram...

2. Core Mechanics & Wire Protocol Comparison

Interactive Architecture Diagram
Synthesizing vector architecture diagram...

Comprehensive Protocol Comparison Matrix

FeatureHTTP/1.1HTTP/2HTTP/3 () (over H2/H3)WebSocket
Underlying TransportTCPTCPUDP ()TCP / UDPTCP
Wire FormatText / ASCIIBinary FramesBinary FramesProtocol Buffers (Binary)Binary / Text Frames
MultiplexingNo (Pipelining flawed)Yes (Single TCP)Yes (Independent UDP)Yes (Multiplexed RPCs)Full Duplex Stream
HOL BlockingApplication LayerTransport (TCP) LayerNoneNone (on H3) / TCP (on H2)None (single stream)
Header CompressionNoneHPACK (Static/Dynamic table)QPACK (Out-of-order)HPACK / QPACKMinimal (2-14 byte frame)
Handshake Latency2−3 RTT2-3\text{ RTT} (TCP + TLS)2−3 RTT2-3\text{ RTT} (TCP + TLS 1.3)0−1 RTT0-1\text{ RTT} ( + TLS 1.3)2−3 RTT2-3\text{ RTT} (Fast reuse)2−3 RTT2-3\text{ RTT} (HTTP Upgrade)
Connection MigrationNo (Breaks on IP change)No (Breaks on IP change)Yes (64-bit Connection ID)No (Depends on transport)No
Streaming SupportChunked TransferServer Push / StreamsIndependent StreamsUnary, Client, Server, Bi-diFull Duplex Bi-directional
Primary Use CaseLegacy Web / Simple APIsModern Web IngressMobile Browsing, Video, CDNInternal Microservices RPCReal-time Chat, Live Feeds

Part 2: Production Deep-Dive Locked1 Coin = 24 Hours

Unlock Complete Architecture & Production Runbooks

Your Balance:40 Coins

You have explored the free architectural preview (~48%). Spend 1 Coin to unlock the remaining 5 production deep-dive sections for a full 24 hours.

Sections Included in This 24-Hour Pass:
3. Mathematical & Network Performance Formulations
4. Production gRPC Service Architecture
5. Critical Edge Cases & Distributed Failure Modes
6. AWS Reference Architecture
7. Interview Delivery Framework
Keeps page unlocked for exactly 24 hoursSpend coins to fund LLM & compute infrastructure