Skip to content
Networking·Intermediate·Conceptual·1 min read

What is the difference between WebSockets and Server-Sent Events?

Short interview answer

WebSockets provide a full-duplex channel where both sides can send messages at any time. SSE is a simpler one-way channel where only the server pushes events to the client over a long-lived HTTP connection.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to REST, GraphQL, and WebSockets

Related questions