hedera-json-rpc-relay
hedera-json-rpc-relay copied to clipboard
WS connection and messages limit improvements
Problem
Currently, the WS server relies on environment variables WS_CONNECTION_LIMIT
and WS_CONNECTION_LIMIT_PER_IP
to determine the maximum amount of connections that can subscribe to the websocket. The fallback value is 10, which means if the env vars are not configured, the WS server only accepts max 10 connections from either multiple client machines or from 1 client machine (signle IP address).
The second issue is that currently, there's no limit configured for methods sent to the server.
Solution
Increase the fallback value for the connection limit
- WS_CONNECTION_LIMIT = TBD (currently 10)
- WS_CONNECTION_LIMIT_PER_IP = TBD (currently 10)
- WS_METHOD_REQUEST_LIMIT_PER_IP = TBD
Alternatives
No response
Blocked by #2801