Overview
Live dashboards, collaborative rooms, notifications and long-lived control links. Opening a socket is the easy part; the work is what happens when it drops: reconnecting, catching up and ignoring stale messages.
SquadUp runs private coding rooms and shared whiteboards over WebSockets. NovaGate's gateways receive their configuration over one outbound WebSocket and keep serving from a local copy while the link is down.
What's included
- WebSocket servers in NestJS, with Socket.IO or native WebSockets
- Authenticated connections and per-room access checks
- Fan-out across server instances with Redis pub/sub
- Reconnection with backoff, buffered messages and version checks
- Live notifications, feeds and dashboards
- Collaborative rooms with shared state
- WebSocket proxying and connection metrics
How I work
- 01
Assume the connection drops
Clients reconnect with backoff, buffer what they couldn't send, and skip updates older than the state they already have.
- 02
Keep the socket thin
Sockets carry events while the database stays the source of truth, so a client that missed messages can reload and carry on.
- 03
Know when to stop retrying
Authentication failures end the retry loop instead of hammering the server.
Shipped proof
Questions
- WebSockets, Server-Sent Events or polling?
- Polling is fine when updates are rare. Server-Sent Events suit one-way feeds such as notifications. WebSockets are for two-way, low-latency traffic like collaboration or control channels.
- How do real-time features scale past one server?
- Each instance holds its own connections, so messages fan out through Redis pub/sub and room membership lives outside the process. NovaGate's control plane publishes every config change on Redis pub/sub for this reason.