Glossary

Long Polling

The client makes a request that the server holds open until it has data, then immediately re-requests.

1 min read·4 sections
Open the interactive version → diagrams, practice & more

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…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →