WebSockets

1 min read index source

WebSockets

Full-duplex, persistent, bidirectional communication over a single TCP connection. Defined in RFC 6455 (2011). Used for chat, real-time dashboards, collaborative editing, multiplayer games, push notifications — anything where the server needs to send to the client without polling.

For comparison with SSE / long-polling see 03_websocket_vs_alternatives.md. For nginx-side proxying see ../nginx/10_websocket_proxying.md.

Files

# Topic
01 WebSocket protocol — handshake, frames, codes
02 Python implementation — websockets, FastAPI, Channels
03 WebSocket vs alternatives — SSE, long-poll, gRPC
04 Authentication
05 Connection management — heartbeats, reconnection, backpressure
06 Security
07 Scaling — broker fan-out, sticky sessions