Definition
The client makes a request that the server holds open until it has data, then immediately re-requests.
How it works
A near-real-time hack over ordinary HTTP for environments without WebSockets/SSE: instead of polling on a timer (wasteful, laggy), the server parks the request and responds the moment something happens. Simple and firewall-friendly, but ties up a connection per client and adds reconnect overhead. WebSockets/SSE are the modern replacements.
Common questions
What is Long Polling?
The client makes a request that the server holds open until it has data, then immediately re-requests.
How does Long Polling work?
A near-real-time hack over ordinary HTTP for environments without WebSockets/SSE: instead of polling on a timer (wasteful, laggy), the server parks the request and responds the moment something happens. Simple and firewall-friendly, but ties up a connection per client and adds…
What is Long Polling used for in system design?
A near-real-time hack over ordinary HTTP for environments without WebSockets/SSE: instead of polling on a timer (wasteful, laggy), the server parks the request and responds the moment something happens. Simple and firewall-friendly, but ties up a connection per client and adds…