Cloud Infrastructure

QUIC

0 of 8 complete

0%

Contents

Back|Cloud InfrastructureQUIC
1/8
20 min left
  1. Home
  2. System Design: Intermediate
  3. Cloud Infrastructure
  4. QUIC
Prerequisites
UDPrequiredTCP Optimizationrequired
Related Topics
HTTP/3 QUICAPI Design & ProtocolsLatencyCore FundamentalsBandwidthCore FundamentalsService Mesh. ConceptsMicroservices Architecture
Previous lessonNetwork Latency OptimizationNext lessonWebRTC

System Design

1 of 8
Foundation
  • Intermediate
  • Advanced
  • Capstone
  • AI Engineering

    • Foundation
    • Data, RAG and Agents
    • Evaluation, LLM Ops and Security

    systemdesign.academy

    • Home
    • Glossary
    • Interview prep
    • Reviews
    • About
    • Privacy
    • Terms

    Why TCP Needed to Be Replaced, Not Just Optimized

    has three fundamental problems that can't be fixed by tuning:

    1. Head-of-line blocking: TCP guarantees in-order delivery. If a multiplexed /2 connection loses one packet from stream A, streams B, C, and D all stall until that packet is retransmitted. The streams are independent logically but share one TCP connection, and TCP doesn't know about streams.

    2. Handshake overhead: TCP requires a 3-way handshake. Add TLS on top, and you need 2-3 round trips before the first byte of application data can flow. On mobile networks with 100ms RTT, that's 200-300ms of pure overhead on every new connection.

    3. Ossification: TCP is implemented in operating system kernels and manipulated by middleboxes (firewalls, NATs, load balancers) worldwide. Deploying TCP protocol changes takes years because every OS and middlebox needs updating.

    Google built QUIC to solve all three. It runs on top of UDP, which middleboxes pass through without modification, and reimplements reliability, congestion control, and encryption in user space. HTTP/3, the next version of HTTP, uses QUIC as its transport. As of 2026, over 30% of web traffic uses QUIC.

    QUIC vs TCP vs HTTP/2

    How QUIC Works

    QUIC = UDP + reliability + encryption + multiplexing

    Per-stream independence is the killer feature. In QUIC, each HTTP stream has its own flow control and loss recovery. If stream A loses a packet, only stream A stalls. Streams B, C, and D continue receiving data uninterrupted. This completely eliminates the head-of-line blocking that plagues HTTP/2 over .

    Connection migration: TCP connections are identified by the source IP, source port, destination IP, and destination port. If your phone switches from WiFi to cellular, the IP changes, and the TCP connection dies. QUIC uses a connection ID instead. The connection survives network switches smoothly, critical for mobile users.

    Zero-RTT resumption: If a client has previously connected to a server, QUIC can send application data with the very first packet, zero round trips of . The server caches cryptographic parameters from the previous connection and uses them to decrypt the early data.

    0-RTT Connection Establishment

    The QUIC Protocol Stack

    Independent Stream Multiplexing

    QUIC Trade-offs and Adoption

    Performance gains (real-world measurements):

    • Google Search: 8% reduction in on desktop, 3.6% on mobile
    • YouTube: 15% reduction in rebuffering
    • Google Maps: 50% faster map tile loading

    Trade-offs:

    • CPU overhead: QUIC runs in user space, not kernel. Encryption and packet processing costs more CPU than kernel . At very high throughput, this matters. Cloudflare benchmarked QUIC at roughly 3.5x the CPU cost of TCP+TLS for the same traffic volume.
    • UDP blocking: Some corporate networks and countries block or rate-limit UDP. QUIC implementations include a fallback to TCP when UDP is unreachable. Google Chrome tries QUIC first, then falls back within 300ms.
    • Debugging: Wireshark can't decode QUIC packets easily because everything is encrypted (including most header fields). You need qlog format and tools like qvis for debugging. Standard tcpdump is mostly useless.
    • Maturity: QUIC libraries (quiche, msquic, ngtcp2) are production-ready but still evolving. The RFC was finalized in 2021 (RFC 9000), so the ecosystem is about five years old compared to TCP's four decades.

    Knowledge Check

    Knowledge Check

    4 questions - Score 80% to pass

    Q1

    What is the head-of-line blocking problem in HTTP/2 over TCP, and how does QUIC solve it?

    Q2

    Why does QUIC run on UDP instead of creating a new transport protocol?

    Q3

    What is QUIC's connection migration feature, and why does it matter for mobile users?

    Q4

    What happens during a QUIC 0-RTT connection?

    Who uses QUIC today:

    • Google (Chrome to Google services, 30%+ of all web traffic)
    • Cloudflare (/3 for all customers, default since 2023)
    • Meta (video delivery, mobile apps, internal RPC)
    • Apple (iCloud, Safari supports HTTP/3, MASQUE protocol)

    How to enable it: Most CDNs (Cloudflare, CloudFront, Fastly) support HTTP/3/QUIC with a toggle. For your own servers, you need a QUIC-capable web server (nginx with quic module, Caddy, H2O) or a that terminates QUIC. Caddy enables HTTP/3 by default with zero configuration.