What shipping real-time features actually costs
Real time is easy in a demo and hard in production. The demo has one client on a good network. Production has thousands of clients on trains, reconnecting mid-update, expecting consistent state.
Treat the socket as an optimisation, not a source of truth. Every client should be able to reconstruct correct state from a plain HTTP read; the live channel just saves them the wait.
Fan-out is where costs appear. Broadcasting derived data — a recalculated table, not a raw event — keeps client logic thin and your compute predictable.
Plan for the reconnect path before launch. Users notice a stale screen far more than a slightly delayed one.
- WebSockets
- Redis
- Socket.io
- Cloud Scaling