WebSocket для true bidirectional low-latency; SSE или polling часто лучше для one-way или infrequent updates.
Разбор
- Use WebSocket для bidirectional — chat, presence, multiplayer, collaborative editing, live trading.
- When NOT — most important: data only server → client — SSE simpler (HTTP, auto-reconnect). Infrequent — polling fine. WebSocket by default — over-engineering tell.
- Operational weight. Sticky routing, pub/sub broadcast, connection limits, reconnection/heartbeat/auth — real infra.
- Proxies/firewalls kill idle long-lived — heartbeats и reconnection not optional.
Итог
Transport choice by data direction and frequency; WebSocket operational cost real — не default для notifications feed.