Hybrid CDN + WebRTC P2P streaming
Loading… OFFLINE
Peers —
P2P down —
HTTP down —
Uploaded —
P2P ratio —

How the high-scale mesh works

1

HTTP bootstrap. First segments are fetched from your server so playback starts immediately without waiting for peers.

2

Multi-tracker peer discovery. ICE candidates are announced to three public WebTorrent trackers. Tracker load is offloaded entirely to free infrastructure.

3

Matrix mesh, not a chain. Each peer holds up to 20 simultaneous P2P downloads and connects to up to 50 peers, so data fans out horizontally rather than down a fragile relay chain.

4

Segment-fetch staggering. httpDownloadInitialTimeoutMs gives the tracker time to find peers before the first HTTP fallback, reducing the simultaneous origin hit spike.

5

Churn-resistant swarm. The built-in churn loop (p2pChurnCleanupIntervalMs) periodically evicts under-performing peers, keeping the mesh fresh as viewers join and leave.

6

Automatic HTTP fallback. If a segment isn't available from any peer within p2pDownloadTimeWindow, it falls back to HTTP silently — no stalls, no errors.