QUIC vs TCP: A Benchmark Deep Dive
Table of Contents
- The Great Protocol Debate
- Benchmark Methodology
- Benchmark Results
- CPU & Memory Overhead
- When to Use QUIC vs TCP
- Further Reading
1. The Great Protocol Debate <a name=”protocol-debate”></a>
TCP (HTTP/2)
- Mature, universally supported
- In-order delivery = head-of-line (HOL) blocking
- 3-way handshake (1-RTT)
QUIC (HTTP/3)
- Built on UDP, avoids HOL blocking
- 0-RTT handshake (faster starts)
- Connection migration (better for mobile)
Key Question: Does QUIC’s complexity translate to real-world gains?
2. Benchmark Methodology <a name=”test-environment”></a>
2.1 Test Environment
- Client:
curl(HTTP/2 + HTTP/3), Chrome 120 - Server: NGINX 1.25 + Cloudflare QUIC
- Network Conditions:
- 0% packet loss (ideal)
- 1%, 5%, 10% packet loss (simulated via
tc) - Mobile network profile (100ms RTT, 2% loss)
2.2 Metrics Measured <a name=”metrics”></a>
- Page Load Time (PLT)
- Time to First Byte (TTFB)
- Throughput (Mbps)
- Connection Startup Time
- CPU Usage (server-side)
3. Benchmark Results
3.1 Ideal Conditions (0% Packet Loss) <a name=”ideal-conditions”></a>
| Metric | HTTP/2 (TCP) | HTTP/3 (QUIC) | Difference |
|---|---|---|---|
| PLT (ms) | 820 | 790 | -4% |
| Throughput | 95 Mbps | 98 Mbps | +3% |
| CPU Usage | 12% | 18% | +50% |
Verdict:
- QUIC is slightly faster in perfect conditions.
- But 50% higher CPU load for marginal gains.
3.2 Under Packet Loss <a name=”packet-loss”></a>
| Packet Loss | HTTP/2 PLT (ms) | HTTP/3 PLT (ms) | QUIC Advantage |
|---|---|---|---|
| 1% | 1,120 | 920 | -18% |
| 5% | 2,310 | 1,450 | -37% |
| 10% | 4,890 | 2,100 | -57% |
Why?
QUIC’s per-stream loss recovery avoids TCP’s head-of-line blocking.
3.3 Mobile Network Simulation <a name=”mobile-network”></a>
| Scenario | HTTP/2 (TCP) | HTTP/3 (QUIC) |
|---|---|---|
| Wi-Fi → 5G handoff | Fails | No drop |
| High latency (200ms) | 2.1s PLT | 1.7s PLT |
Key Insight:
QUIC shines in unstable networks.
3.4 Connection Startup Time <a name=”connection-startup”></a>
| Handshake Type | TCP (HTTP/2) | QUIC (HTTP/3) |
|---|---|---|
| Cold Start | 1-RTT | 1-RTT |
| Resumed | 1-RTT | 0-RTT |
0-RTT Warning:
⚠️ Replay attack risk (QUIC’s “dirty little secret”)
4. CPU & Memory Overhead <a name=”cpu-memory”></a>
| Resource | HTTP/2 (TCP) | HTTP/3 (QUIC) |
|---|---|---|
| CPU | 12% | 18% |
| Memory | 150 MB | 210 MB |
Why?
- QUIC encrypts every packet header.
- More complex congestion control.
Mitigation:
- Hardware-accelerated AES (AES-NI)
- Limit concurrent QUIC connections
5. When to Use QUIC vs TCP <a name=”when-to-use”></a>
Use QUIC If:
✅ Mobile apps
✅ High packet loss (satellite, cellular)
✅ Frequent connection migration (e.g., video calls)
Stick with TCP If:
✅ Enterprise networks (UDP often blocked)
✅ Low-power devices (IoT, embedded)
✅ Debuggability matters (QUIC hides errors)
6. Further Reading <a name=”further-reading”></a>
📚 Books:
- *”HTTP/3 Explained”* (Daniel Stenberg)
- *”Networking and HTTP/3″* (O’Reilly)
🔗 Tools:
Final Takeaways
- QUIC wins on unstable networks (37–57% faster under packet loss).
- TCP is simpler and more efficient for stable, high-bandwidth scenarios.
- 0-RTT is powerful but risky (disable for sensitive data).
“QUIC is a sports car; TCP is a reliable pickup truck.”
Filed under: Protocol Leaks - @ July 21, 2025 12:23 pm