When do you choose a plain API, polling, SSE or WebSocket?
Answer out loud or in your head first, then compare.
Answer
A plain HTTP request is enough when the client wants to fetch or save data and get a response. Polling is simple when you can ask for a status every few seconds. SSE suits successive updates sent by the server, and WebSocket frequent exchange in both directions.
For a long document analysis I can start with a POST and then read the status. If I need smooth progress, I add SSE. I don't choose WebSocket just because it's “live”. Every option needs access control, error handling and handling of lost connections. Whether there's an event history depends on the backend, not the transport itself.
Why it matters: Now an extension of concepts explained separately, not a list of unfamiliar names.
Possible follow-ups: What matters for a connection that lasts several minutes?
How did it go? Be honest — “Not yet” puts the question on your review list.
Start with
- D-P05 · What is a WebSocket? — Backend, data and system design
- D-P07 · What is SSE? — Backend, data and system design
- D-P08 · What is streaming, and how is it different from polling? — Backend, data and system design
Further reading
- Node.js: Backpressuring in Streams(opens in a new tab)Docs; accessed 22.10.2026. Flow, drain and limiting memory use.