Concepts · Concept
SSE
-unidriection
- over http
-build in browser support for reconnection
-still just looks like a look running HTTP request
-HTTP headers to indicate we will be sending in chunks
“SSE is a one-directional channel — server pushes events to the client over a single long-lived HTTP connection, but the client can’t send messages back over that same channel. It’s simpler than WebSocket: built on plain HTTP, auto-reconnects natively in the browser, and works through normal HTTP infrastructure (proxies, load balancers) without special handling.”
When to reach for it:
- Server needs to push updates to the client, but the client never needs to talk back over that channel (e.g., Ticketmaster’s waiting-queue position updates — server tells you your position, you don’t send anything back)
- You want something simpler and lighter-weight than WebSocket, and don’t need bidirectionality
Its weak spot: one-directional only — if the client ever needs to send data back in the same interaction, you’d need a separate regular HTTP request alongside it, or switch to WebSocket entirely.