Engineer Atlas
OverviewLearnJourneysPacket LabDebuggerRoadmapPracticeInterviewCheat Sheet
OverviewLearnJourneysPacket LabDebuggerRoadmapPracticeInterviewCheat SheetCompareConnections
Computer Networking
  • How the Internet Works
  • Ethernet, MAC & the Link Layer
  • IP, IPv4, IPv6, Subnets, NAT & Ports
  • Routing
  • DNS
  • UDP
  • TCP
  • TLS & Certificates
  • HTTP/1.1, HTTP/2 & HTTP/3
  • WebSockets, SSE & Polling
  • Proxies, Load Balancers & CDNs
  • Firewalls & VPNs
  • Container & Kubernetes Networking
  • Network Performance
  • Network Debugging & Capstone
  • Packet Lab
OS + Networking
  • OS + Networking Together
Networking/Learn/WebSockets, SSE & Polling
Computer Networking

WebSockets, SSE & Polling

Getting data from the server without asking: polling, server-sent events and WebSockets compared on directionality, infrastructure, reconnection and scale.

The question this module answers · The server has news. How does it tell a browser that only ever asks?
WebSockets
▶ interactive

A WebSocket starts as an HTTP request that asks to switch protocols, gets `101 Switching Protocols`, and from then on the same TCP connection carries framed messages in both directions for as long as both sides want — which makes every proxy, load balancer and idle timer between them part of the design.

Polling vs Long Polling vs SSE vs WebSockets
▶ interactive

Four ways to get data from a server that has news to a client that only asks: repeated requests, requests the server holds open, a one-way HTTP stream with built-in reconnection, and a bidirectional socket — each trades infrastructure simplicity against latency and directionality.

Engineer Atlas
GitHub·LinkedIn