Five ways to find out something changed — and the real difference between them is who stays connected, to whom, and for how long
By The Coding Gopher
Published: 2026-10-15
URL: https://thecodinggopher.substack.com/p/polling-vs-long-polling-vs-sse-vs
“How does the client find out something happened on the server?” has exactly five common answers in modern system design, and they form a rough spectrum: from asking repeatedly and hoping, all the way to a fully open, bidirectional line that never closes. None of the five is obsolete. Each one is the right answer to a slightly different version of the question.
Polling
The client asks on a fixed schedule — every five seconds, every thirty — regardless of whether anything has actually changed. It’s a plain HTTP request repeated in a loop.
Polling is a synchronous technique where a program repeatedly checks the status of a resource, device, or external system at regular intervals to see if a specific condition has been met or if new data is available. Instead of waiting for the external system to actively send an alert, the program continuously asks, "Is there any new data yet?".
Polling’s entire appeal is that it requires nothing special: any client that can make an HTTP request can poll, and any server that can answer one can be polled. The cost is baked into that simplicity. Most requests come back with nothing new, which wastes bandwidth and server capacity, and the best-case latency is capped by however long you’re willing to wait between checks. Poll every thirty seconds, and the freshest you’ll ever be is thirty seconds stale.
Join a community of senior engineers. Subscribe and get FREE access to System Design deep dives.
Long Polling
Long polling keeps the request/response shape of ordinary polling but changes what happens in between. The client sends a request, and instead of answering immediately, the server holds it open — doing nothing — until either new data shows up or a timeout is reached. Only then does it respond. The client immediately opens a new request and the cycle repeats.
HTTP long polling is a web communication method where the client sends a request to the server, and the server holds that connection open instead of replying right away. The server waits until new data is ready or a set time limit passes, sends the response, and then the client immediately starts a new request.
This closes most of polling’s latency gap without inventing a new protocol; it’s still plain HTTP underneath. The trade is that the server now has to hold open a connection — and often a thread or worker — for every client that’s waiting, which is a much heavier resource commitment than answering a quick, stateless request. It scales better than tight polling, but nowhere near as well as the persistent-connection models built to replace it.
Server-Sent Events (SSE)
SSE keeps a single HTTP connection open indefinitely and lets the server stream events down it as they happen, using a lightweight text/event-stream format. The browser’s built-in EventSource API handles reconnection automatically, and can even resume from the last event it saw if the connection drops.
Server-sent events (SSE) let a web server push data updates to a browser over a single, long-lived HTTP connection. The browser uses the built-in EventSource object to listen for incoming text messages automatically without needing to send repeated requests.