KyoMel / Yogyakarta, Indonesia

Term 203203 / 344

WebTransport Protocol

Month
March 2026
Day
30
Source
2026/mar-term.md

Definition:

WebTransport is a modern web protocol that provides low-latency, bidirectional communication between browsers and servers over HTTP/3 (QUIC). It combines the best features of WebSockets (real-time bidirectional messaging) and WebRTC (fast, unreliable data channels) while solving their limitations. WebTransport supports both reliable streams (like TCP) and unreliable datagrams (like UDP) in a single connection.

Simple analogy:

WebSockets = Phone call (reliable, but if connection drops, you lose everything) WebRTC = Walkie-talkie (fast but complex setup, peer-to-peer only) WebTransport = Modern smartphone app (reliable when needed, fast when wanted, easy server communication)

Why WebTransport Exists The Problem with Current Technologies

┌────────────────────────────────────────────────────┐
│  Traditional Web Real-Time Communication          │
└────────────────────────────────────────────────────┘

WebSockets (2011)
├─ Protocol: TCP-based (HTTP/1.1 upgrade)
├─ Reliability: Always reliable (every packet guaranteed)
├─ Latency: Higher (TCP head-of-line blocking)
├─ Use case: Chat, notifications
│
❌ Problems:
├─ Single stream = one slow packet blocks everything
├─ No way to send "lossy" data (like video frames)
├─ Can't prioritize urgent messages
└─ TCP handshake adds latency

Example Problem:
┌──────────────────────────────────────┐
│ Video Chat + Text Chat over WebSocket│
└──────────────────────────────────────┘
  Packet 1: Video frame 🎥 (important)
  Packet 2: Video frame 🎥 (important)
  Packet 3: Text message 💬 (urgent!)
  Packet 4: Lost video frame ❌
  
  Result: Packets 1, 2, 3 wait for 4 to be retransmitted
  → Text message delayed by video buffering!

───────────────────────────────────────────────────────

WebRTC Data Channels (2012)
├─ Protocol: SCTP over DTLS/UDP
├─ Reliability: Configurable (reliable or unreliable)
├─ Latency: Low (UDP-based)
├─ Use case: Gaming, video conferencing
│
❌ Problems:
├─ Complex setup (STUN, TURN servers)
├─ Primarily peer-to-peer (browser-to-browser)
├─ Difficult for client-server architectures
├─ NAT traversal issues
└─ Large overhead for simple use cases

Example Problem:
┌──────────────────────────────────────┐
│ Simple multiplayer game              │
└──────────────────────────────────────┘
  Need: Fast server → client updates
  Reality: Must set up STUN/TURN, complex signaling
  → 500+ lines of boilerplate code

───────────────────────────────────────────────────────

WebTransport (2021+)
├─ Protocol: HTTP/3 (QUIC) or HTTP/2
├─ Reliability: Both reliable + unreliable modes
├─ Latency: Low (no head-of-line blocking)
├─ Use case: Everything!
│
✅ Solutions:
├─ Multiple independent streams (no blocking)
├─ Unreliable datagrams for time-sensitive data
├─ Reliable streams for critical data
├─ Simple client-server model (like WebSockets)
├─ Built on HTTP/3 (modern, fast)
└─ No NAT traversal complexity

Example Solution:
┌──────────────────────────────────────┐
│ Video Chat + Text Chat over WebTransport│
└──────────────────────────────────────┘
  Stream 1: Text messages (reliable)
  Stream 2: Video frames (unreliable datagrams)
  
  Lost video frame? → Skip it, send next frame
  Text message? → Always delivered in order
  → No interference between streams! ✅

Example:

Real-Time Racing Game Game Requirements

"TurboRace" - Browser-based racing game
├─ 60 FPS gameplay
├─ Player positions updated 20 times/second
├─ Chat messages (must be reliable)
├─ Game state sync (reliable)
└─ Player inputs (can drop old inputs)

Performance Comparison

Test: 100 players, 20 position updates/second

WebSocket (Baseline):
├─ Protocol: TCP (reliable)
├─ Bandwidth: ~800 KB/s
├─ Latency: 50-100ms (head-of-line blocking)
├─ Dropped packets: Retransmitted (increases latency)
└─ Result: Choppy gameplay, lag spikes

WebRTC Data Channels:
├─ Protocol: SCTP over UDP
├─ Bandwidth: ~500 KB/s
├─ Latency: 20-40ms
├─ Dropped packets: Ignored (unreliable mode)
├─ Setup: Complex (STUN/TURN)
└─ Result: Good performance, but complex

WebTransport:
├─ Protocol: HTTP/3 (QUIC)
├─ Bandwidth: ~400 KB/s (efficient multiplexing)
├─ Latency: 15-30ms
├─ Dropped packets: Ignored (datagrams) / Retransmitted (streams)
├─ Setup: Simple (like WebSocket)
└─ Result: Best performance + simplicity ✅

Key Advantage:
Position updates (datagrams): Lost frames don't block future frames
Chat messages (streams): Guaranteed delivery, independent of positions
→ No interference between data types!

Keep reading