Size servers for concurrent WebSocket connections and message throughput.
WebSocket capacity is usually memory-bound rather than CPU-bound, because idle connections consume buffers continuously. File descriptor limits and ephemeral port ranges often bind before memory does. Persistent connections make deployments harder, since every restart forces every client to reconnect at once, which is a thundering herd the system must absorb.
WebSocket Connection
Memory = connections × per-connection memory; bandwidth = message rate × size × 8
Memory = connections × per-connection memory; bandwidth = message rate × size × 8 WebSocket capacity is usually memory-bound rather than CPU-bound, because idle connections consume buffers continuously. File descriptor limits and ephemeral port ranges often bind before memory does.
Persistent connections make deployments harder, since every restart forces every client to reconnect at once, which is a thundering herd the system must absorb.
This calculator takes 5 inputs: Concurrent connections, Memory per connection, Messages per connection per minute, Average message size, 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.