Long polling
A pull that, if there's nothing, waits a while with the connection open for something to arrive before returning empty.
Example
Each question waits up to 20 seconds: you go from 3,600 questions per hour to about 180.
Test yourself: Long polling
Real time: long polling, WebSockets and SSE
With long polling, the server answers as soon as it gets the request, even if there's nothing new.
It holds the request until there's something new or, for example, 30 seconds pass.
Real time: long polling, WebSockets and SSE
What's long polling's main disadvantage?
With 100,000 users, each message opens another connection: 100,000 new connections over and over.
0/2
â–¶ Play