A Practical Introduction to WebSockets
summary
Shows a concrete design: a React client, a NestJS backend using Socket.IO, a jobs gateway and a job tracker that centralizes polling (example interval 5s) so one backend poller replaces per-tab polling (1 user = 12 requests/min, 1,000 users = 12K, 10,000 = 120K). Clients join two server-controlled rooms (session and global); backend emits job_started/job_finished to rooms, updates tracked-jobs map, and cleans up. Also covers auth via cookies/origins, fallback/testing strategies and basic scaling concerns.
AI-written summary · about
chapters (10)
- 0:00Introduction and context
- 1:05Problem with polling approach
- 4:43Introducing WebSockets
- 6:49Architecture and flow
- 9:41Connection handling
- 11:47Tracking indexing jobs
- 15:17Handling shared job updates
- 18:03Security and testing
- 19:31Summary and recap
- 20:55Q&A session








