Skip to main content
  1. References/
  2. Architecture Design Basics/
  3. Pattern Taxonomy/
  4. Encoding & Data Formats/

Transport Protocols

·· 203 words· 1 min

🟠 P1 — understanding HTTP/2 is essential for gRPC; WebSocket vs SSE comes up in real-time designs

Problem #

The transport layer determines connection multiplexing, head-of-line blocking, and real-time communication capability.

HTTP Versions #

FeatureHTTP/1.1HTTP/2HTTP/3 (QUIC)
Multiplexing❌ One request per connβœ… Many streams per connβœ… Many streams per conn
Head-of-line blockingTCP-levelTCP-level (still!)❌ Per-stream (UDP-based)
Header compression❌ Noβœ… HPACKβœ… QPACK
Server push❌ Noβœ… Yesβœ… Yes
Connection setupTCP + TLS (2-3 RTT)TCP + TLS (2-3 RTT)0-1 RTT (QUIC handshake)

Real-time Push Mechanisms #

MechanismDirectionProtocolUse caseComplexity
Long-pollingServer β†’ ClientHTTP/1.1Legacy real-timeLow
Server-Sent EventsServer β†’ ClientHTTP/1.1+Notifications, feedsLow
WebSocketBi-directionalWSChat, gaming, collaborationMedium
gRPC streamingBi-directionalHTTP/2Internal service streamingMedium

Instinct #

HTTP/2 is the default for service-to-service. HTTP/3 is still emerging for backend use. For real-time client features: SSE if you only need server→client push (simpler, works with HTTP/2, auto-reconnect). WebSocket if you need true bi-directional (chat, collaborative editing). Avoid long-polling in new designs.

DDIA 2e Reference #

  • Chapter 4: Modes of dataflow
  • Chapter 11: Stream processing (for server-push patterns)

Other references #