hedera-json-rpc-relay icon indicating copy to clipboard operation
hedera-json-rpc-relay copied to clipboard

WS connection and messages limit improvements

Open quiet-node opened this issue 10 months ago • 1 comments

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

quiet-node avatar Apr 18 '24 14:04 quiet-node

Blocked by #2801

victor-yanev avatar Aug 08 '24 12:08 victor-yanev