Interview knowledge

WebSockets vs SSE vs API polling

Growingest.Started 30 Aug 20261 min read#engineering#networking

WebSockets SSE API pollingin the trade-off explorer →

Where it sits: Real-time updates

WebSockets is 2 way open connection.
SSE (Server Sent Events) is one way.
API usually have a timeout of 30-60 seconds, configured by an outside system, often.

If the operation you're doing will take more than 5-10 seconds, it's best to make it async.
APIs can be done async if you poll, or you can keep an open connection

When is polling better? Why is it more simple? Doesn't need to keep the connection open? Which one has less load on server?