Frontend System Design Course
Frontend System Design
/
Intermediate

Server Sent Events (SSE)

Definition

Server-Sent Events (SSE) is a standard allowing a browser to receive automatic updates from a server via HTTP connection. Unlike WebSockets, SSE is unidirectional (Server -> Client only).

Explain Like I'm New

SSE is like subscribing to a newsletter. You tell the server you want updates, and the server continuously sends you messages without you having to ask again.

Parameter Breakdown

FeatureWebSocketsServer Sent Events (SSE)
DirectionBidirectional (Full Duplex)Unidirectional (Server to Client)
Protocolws:// or wss://Standard HTTP/HTTPS
Data FormatBinary or TextText only (UTF-8)
Use CaseMultiplayer Games, ChatStock tickers, News feeds

Interview Questions

basic

  • Can you explain the basic concept of Server Sent Events?
  • Why is Server Sent Events important in frontend system design?

intermediate

  • How does Server Sent Events impact perceived performance and user experience?
  • Describe a scenario where you had to debug an issue related to Server Sent Events.

advanced

  • In a highly scaled enterprise system, how do you optimize Server Sent Events?
  • What are the security implications of Server Sent Events?

trick

  • Can Server Sent Events be entirely bypassed or disabled? What happens if it is?

Flash Cards

Question

Define Server Sent Events.

Click to reveal answer
Answer

Server Sent Events is a core mechanism in frontend architectures.

Question

What is the main bottleneck for Server Sent Events?

Click to reveal answer
Answer

Usually network latency or CPU-bound synchronous tasks blocking the main thread.