Do you really need WebSockets?
summary
WebSockets provide true full-duplex communication by starting as HTTP then performing an HTTP Upgrade 101 to the WebSocket protocol (introduced 2011 for Google Wave), which is ideal for bidirectional needs like voice, video or games. Alternatives: Server-Sent Events (SSE) are pure HTTP, auto-reconnect, need a polyfill for some Microsoft browsers and suffer the browser six-connection limit but simplify server logic; long polling is plain HTTP, uses less connection pool overhead and scales to many clients but costs more bandwidth. Pick by implementation cost and whether clients must send freely to the server.
AI-written summary · about
chapters (9)
- 0:00Introduction and speaker intro
- 1:04Problem with half-duplex HTTP
- 4:37What are WebSockets
- 6:48WebSockets in browsers
- 7:51Trade-offs of using WebSockets
- 8:54Server-Sent Events as alternative
- 13:07Long polling explained
- 15:35Comparison and conclusion
- 17:22Q&A session








