Server-Sent Events
- Server → Client only
- Server keeps a connection open and streams updates to the browser
- Lighter than web socket
- Built on HTTP (lightweight and browser-native)
- Browser has native support (
EventSource)
❌ Not good for high-frequency data (no client → server)
Workflow:
- Client → open connection
- Server → keeps connection alive
- Server → pushes events when something changes
Perfect for:
- Notifications
- Live logs
- Progress updates (upload, processing)
- Realtime dashboard data
❌ Chat (because client → server is needed)