Real-Time Protocols
5 min read.
Compare Short Polling, Long Polling, Server-Sent Events (SSE), and WebSockets in a side-by-side race.
Think of it this way: Short Polling is repeatedly asking "Are we there yet?". Long Polling is asking once, and the driver stays silent until you arrive, but then you have to immediately ask again. SSE is a radio broadcast from the driver. WebSockets is a walkie-talkie connection left permanently on between you and the driver.
The server gets new data at seconds 3, 7 and 11.
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
Which protocol is this?
Sort each description into the real-time technique it describes.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Short polling
Drop items hereLong polling
Drop items hereServer-Sent Events
Drop items hereWebSocket
Drop items hereQuiz
21 questionsA user types a message AND receives replies from teammates in the same session. Which property of the chosen protocol is essential?
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.