Is it allowed to create multiple websocket connections to subscribe to over 1024 streams from a single IP/Machine ? Let’s say three connections with 500 stream subscriptions each, so 1500 in total.
In the docs it says there is a limit of 5 incoming messages per second, but it does not clarify if the limit is for a single connection or multiple connections from a single IP/Machine combined. Let’s say we still have the three connections, does it mean that the websocket server allows 5 messages a second per individual connection (15 in total) or 5 messages per all connections combined (5 in total) ?
Still not clear. For example my server use 1000 separate connections from same IP address. And at given moment very likely more then 5 ping msgs will send at same time. Will it terminate all connections or some and how I should handle it? Do you send some terminate signals and what code?
The 5 incoming messages per second rate limit applies to each individual connection independently. If all your connections send pings at the same time, that should be fine as long as each individual connection sends pings at a reasonable rate.
If the rate limit is violated, your connection will be terminated. You’ll get a close frame with the standard Policy Violation status code (1008), and the close frame body will be “Too many requests”.