Real-Time & Communication
Overview

Real-Time & Communication

When request-response isn't fast enough.

Everything you need to know about real-time communication, video streaming, and presence systems.


Topics

ChapterWhat It Covers
WebSocketsFull-duplex, handshake, connection lifecycle
Server-Sent Events, Long/Short PollingOne-way streaming, reconnection, polling tradeoffs
Socket.IO & NotificationsFallback transports, rooms/namespaces, notification fan-out
Video & StreamingHLS, DASH, transcoding, CDN, DRM
Presence SystemsOnline/offline status, heartbeat mechanisms

The Real-Time Spectrum

TechniqueDirectionLatencyComplexity
Short PollingClient → ServerHighLow
Long PollingClient ↔ ServerMediumLow
SSEServer → ClientLowMedium
WebSocketsBidirectionalVery LowHigh
Socket.IOBidirectionalLowMedium

Pick the simplest one that meets your latency requirements.