TL;DR: For a B2B SaaS chat room, publish a periodic full snapshot beside every incremental diff. Put snapshotVersion and diffVersion on the messages, and apply a diff only when its base matches the snapshot already held by the client. That gives a reconnecting or late-joining browser a bounded route to the current room state without building a per-client history service.
Choice Late joiner Fan-out cost Server state Pick it when
Diffs only Cannot reconstruct earlier state Low Low Never for authoritative room state
Snapshot plus diffs Converges at the next snapshot Predictable broadcast Current state plus two counters Most chat rooms and live dashboards
Per-client replay Replays from a cursor Depends on backlog Durable ordered history Every intermediate event matters
My default is the middle row. The hard part is not WebSocket syntax. It is deciding what a subscriber may safely apply after packets are delayed, duplicated, or observed only after a reconnect.…