SSE vs WebSockets vs Long Polling
summary
Concrete comparison of SSE, Web-Sockets, and Long-Polling with code and a working demo: Node backends behind nginx, HTTP/2 multiplexing pushes many widget streams over single HTTP/2 multiplexed connection, SSE client uses EventSource and an event id resume so reconnects fetch missed messages, proxies drop idle streams (~15s) so demo uses keep-alive padding, gzip moved to nginx, and a test with five node processes yields only three live message sources during the demo, showing practicality and remaining edge cases.
AI-written summary · about
chapters (7)
- 0:00Start
- 1:56TOPICS
- 2:50THE BUSINESS CASE
- 8:19MAXIMAL LATENCY
- 10:04CONNECTION ESTABLISHMENT
- 10:41PERFORMANCE
- 27:22THE DEVIL IS IN THE DETAILS








