Your friend sends a message. The server can only hold it.
Up to two seconds late, your phone asks again.
Only now do you see the message.
Asking over and over wastes trips and still arrives late.
An open connection lets the server speak first.
Use server-sent events for one-way updates, WebSockets for two-way.
Reach for it when
When people expect changes within a second, like chat or a delivery map. Asking every minute is fine for hourly reports.
The catch
Each open line holds server memory, so 100,000 chat users means 100,000 open lines, and every dropped line must catch up.
Say it in an interview“For chat I would use WebSockets so the server can push. Clients reconnect and resume from the last message ID. For one-way feeds, server-sent events are simpler.”