AlgoMaster Logo

Server-Sent Events

Medium Priority11 min readUpdated July 4, 2026
AI Mock Interview

Practice this topic in a realistic system design interview

Consider a live dashboard. The server needs to push updates whenever a job finishes, a metric changes, or a new alert appears, but the browser does not need to send messages back over the same connection.

WebSockets can do this, but a two-way message channel may be more than you need. Long polling can also work, but every response closes the request and forces the browser to ask again.

Server-Sent Events (SSE) sit between those two options. The browser opens one HTTP connection, and the server keeps sending text events over that same response.

Connection stays openGET /events200 OK, text/event-streamJob completedevent: job-completedata: {"jobId":"abc"}Alert createdevent: alertdata: {"severity":"high"}BrowserServerEvent ProducerBrowserServerEvent Producer
7 / 7
algomaster.io

This chapter covers what SSE does well, what it does not do, how its text format works, how browser reconnects work, how to build an SSE endpoint safely, and when to choose SSE instead of long polling or WebSockets.

1. What SSE Provides

Premium Content

This content is for premium members only.