Infrastructure Decisions · judgement tool
Do I need WebSockets?
Do I need WebSockets? Answer a few real conditions and get a Not yet / Probably yes / Yes-priority verdict — every factor tagged official fact, calculation, StackSays rule or estimate. No fabricated industry threshold.
A judgement tool, not a tool ranking · thresholds are StackSays rules, not industry standards · official facts verified 2026-07-17 · share the URL to share your answers
Your situation
The recommendation updates as you answer. Share the URL to share it.
Recommendation
Not yet
Based on the factors you set — 0 pushing toward adopting, 2 against.
Why it might be premature
- -16 Server-push only — If updates flow server→client only, Server-Sent Events (SSE) over plain HTTP are simpler and auto-reconnect (official web standard)official fact
- -8 Serverless hosting — Serverless/edge doesn't hold long-lived sockets well; a managed realtime service or SSE avoids that (our judgement)StackSays estimate
When to reassess
Add WebSockets when you truly need low-latency two-way messaging or presence; until then SSE or polling is usually enough.
Minimal implementation
For server→client only, use SSE (EventSource) or short polling. For true realtime, a managed service (Pusher/Ably/Supabase Realtime) avoids running socket servers.
Risk of not doing it
None if updates are one-directional; if you genuinely need bidirectional realtime, polling adds latency and load.
Cost & complexity once adopted
Persistent connections need sticky routing/scaling and reconnection logic; a managed realtime service offloads most of it.
This is a judgement tool, not a leaderboard. The StackSays rule and StackSays estimate factors are StackSays logic and opinion; the official fact factors link to official sources below. No industry-standard threshold is implied — the answer is driven by the conditions you set.
Official facts cited
| Source | Verified |
|---|---|
| MDN — Server-Sent Events (official web docs) | 2026-07-18 |
| MDN — WebSockets API (official web docs) | 2026-07-18 |
Only the factors tagged “official fact” rest on these sources; rules and estimates are StackSays logic and are labeled as such.