A hands-on benchmark built with a Node harness and a byte-counting TCP proxy measures the real wire cost of WebSocket, SSE, and long polling delivering 1,000 events. WebSocket used 119,692 bytes, SSE 131,596 (10% more), and HTTP/1.1 long polling 884,698 bytes (7.4x), mostly re-sent headers. On HTTP/2, long polling drops to 182,475 bytes (1.56x payload). Latency differences at low event rates were under 0.3ms across all three; long polling only degrades when events arrive faster than a round trip. Server memory for 500 idle connections favored WebSocket (6.2-6.7MB) over SSE (11MB) and long polling (10.3-10.9MB). Practical failure modes covered include idle timeouts, proxy buffering, and the six-connections-per-origin HTTP/1.1 cap on SSE. The recommendation: build SSE first for server-to-client feeds, move to WebSocket only when upstream or binary data is needed.

WebSocket vs SSE vs Long Polling: The Real Cost of 1,000 Events
9
4August 15, 2026 11K 15