Size WebSocket fan-out: servers required, message rate, bandwidth and the memory each long-lived connection pins.
WebSocket connections are idle most of the time but never close, so capacity is driven by memory and file descriptors rather than request rate. The message rate and its bandwidth are computed separately because a large fan-out can be bandwidth-trivial and memory-enormous. Long-lived connections do not drain: after a deployment every client reconnects at once, so the per-server ceiling has to leave room for the whole population to land on the remaining nodes.
WebSocket Capacity
servers = ceil(connections ÷ per-server limit); message rate = connections × messages per minute ÷ 60; bandwidth = message rate × message size × 8.
servers = ceil(connections ÷ per-server limit); message rate = connections × messages per minute ÷ 60; bandwidth = message rate × message size × 8. WebSocket connections are idle most of the time but never close, so capacity is driven by memory and file descriptors rather than request rate. The message rate and its bandwidth are computed separately because a large fan-out can be bandwidth-trivial and memory-enormous.
Long-lived connections do not drain: after a deployment every client reconnects at once, so the per-server ceiling has to leave room for the whole population to land on the remaining nodes.
This calculator takes 5 inputs: Concurrent WebSocket connections, Messages per connection per minute, Average message size, Memory per connection, Connections per server. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.