๐Ÿš€

QUIC vs WebRTC: Why the Switch Back to QUIC?

A Real-world Case of Switching to QUIC After Struggling with WebRTC Complexity

QUIC is a transport protocol designed by Google and the foundation of HTTP/3. It solves TCP's three chronic problems โ€” slow connection establishment (2-3 RTT), Head-of-Line Blocking (entire stream waits when one packet is lost), and connection drops on IP change โ€” on top of UDP.

Noctiluca Dev Story โ€” How QUIC Was Reached

A developer called unstabler posted their real-world development journey on GeekNews. They insisted on using Linux desktop but needed to build iOS apps, so they built their own remote control software.

Attempt 1: xrdp + ulalaca

Tried attaching xrdp (open-source RDP) to macOS via a VNC backend + ScreenCaptureKit plugin called 'ulalaca.' Never reached practical usability โ€” GFX/RemoteFX codec support disappeared from Windows, and debugging audio/clipboard sync was nightmarish.

Attempt 2: WebRTC

Retried with WebRTC after shelving ulalaca for 6 months. WebRTC had its own walls:

  • Customization barrier: Had to modify and rebuild Chromium source code just to use screen data as video source

  • Port fixation impossible: Needed signaling server + STUN/TURN, couldn't fix outgoing ports

  • SCTP curse: WebRTC DataChannel uses SCTP internally โ€” when payload exceeds MTU, video/audio streams start lagging

Attempt 3: QUIC โ€” Finally solved

Shelved again for 6 months. Remembered QUIC while spacing out at a cafรฉ. macOS/iOS Network.framework provides QUIC, so prototyping was fast โ€” and every WebRTC problem was instantly solved.

HOL Blocking solved: QUIC streams are independent. One lost audio packet doesn't freeze mouse input or video frames.

Single UDP port: No signaling/STUN/TURN complexity. Just open one UDP port. Connection Migration keeps sessions alive across WiFi AP switches.

Community reaction โ€” Parsec comparison

'Just use Parsec?' โ€” Parsec is excellent but requires matching monitor sizes and doesn't support mobile (iPad). Noctiluca targets what Parsec can't: RemoteApp-style individual window display, USB redirection, and ultimately iOS development from a Linux laptop.

Why QUIC fits remote control

Issue WebRTC QUIC
Infra complexity Signaling+STUN+TURN 1 UDP port
Customization Modify Chromium source Standard libraries
HOL Blocking Occurs in SCTP DataChannel Resolved by stream independence
Port fixation Impossible Possible
Connection Migration Not supported Built-in
Media codecs Built-in (pro and con) DIY (more freedom)

Architecture Diagram

Connection Setup: TCP+TLS vs QUIC
TCP + TLS (traditional)
RTT 1 TCP SYN โ†’ SYN-ACK โ†’ ACK
RTT 2 TLS ClientHello โ†’ ServerHello
RTT 3 TLS Finished โ†’ Data transfer begins
2-3 RTT required
QUIC
RTT 1 Initial (incl. TLS 1.3) โ†’ Connected!
Revisit 0-RTT: Data from the first packet!
1 RTT (revisit 0-RTT)
Head-of-Line Blocking Problem
TCP / WebRTC SCTP
Video Audio Input BLOCKED
1 packet lost โ†’ all blocked
QUIC (independent streams)
Stream 1: Video x lost Only this retransmitted
Stream 2: Audio ✓ continues
Stream 3: Input ✓ continues
Infrastructure Complexity: WebRTC vs QUIC
WebRTC
Required Signaling server (SDP exchange)
Required STUN server (public IP discovery)
Required TURN server (NAT relay)
Problem No port pinning / no reuse
Problem Chromium source modification needed (custom)
QUIC
Done Just open 1 UDP port
Solved No signaling/STUN/TURN needed
Solved Port pinning possible
Solved Native support (Network.framework etc.)
Connection Migration
๐Ÿ“ถ
WiFi AP-A
IP: 192.168.1.10
AP switch
๐Ÿ“ถ
WiFi AP-B
IP: 192.168.2.20
TCP/WebRTC
IP change โ†’ disconnected
QUIC
Connection ID preserved โ†’ no disconnection
Practical lesson: WebRTC is optimized for browser P2P video calls. For custom real-time streaming like remote desktop, QUIC is much simpler and more powerful

How It Works

1

Client sends Initial packet to server UDP port (including TLS 1.3 ClientHello)

2

Server responds with Handshake packet โ€” encryption negotiation + connection established in 1-RTT

3

0-RTT on revisit: data can be sent from the first packet using previous session key

4

Independent stream multiplexing: video/audio/input sent as separate streams, loss in one does not affect others

5

Connection ID-based management: connection persists even when IP changes during WiFi โ†’ LTE switch (Connection Migration)

6

Built-in flow control + congestion control for adaptive transmission based on network conditions

Pros

  • 0-RTT / 1-RTT connection establishment (saves 1-2 RTT vs TCP+TLS)
  • Head-of-Line Blocking fully resolved (stream independence)
  • Connection Migration (connection persists despite IP change)
  • All communication through single UDP port (no complex infrastructure like WebRTC)
  • Built-in TLS 1.3 (no separate encryption layer needed)

Cons

  • UDP-based so may be blocked by some firewalls/networks
  • Compatibility issues with existing TCP middleboxes (firewalls, IDS)
  • High implementation complexity (custom retransmission, congestion control needed)
  • Media codecs/echo cancellation not built-in like WebRTC (implement yourself)
  • Performance degradation possible without UDP-optimized NIC/kernel

Use Cases

HTTP/3 (all modern web browsing) Remote desktop / screen sharing (Noctiluca) Real-time games (low-latency UDP + reliability) Mobile app APIs (frequent network switching) CDN / edge server communication