Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[Feature request] websocket rate limit flag #7549

Closed
tugytur opened this issue Jul 26, 2023 · 4 comments
Closed

[Feature request] websocket rate limit flag #7549

tugytur opened this issue Jul 26, 2023 · 4 comments

Comments

@tugytur
Copy link
Contributor

tugytur commented Jul 26, 2023

RPC nodes are usually used via wss connections. Currently there is no proper way to rate limit this.

Currently rate limiting can be enforced via reverse proxy for rpc calls, but this does not work for wss connections because for the proxy this looks like one call when it establishes the connection.

We run public rpc endpoints, we are not planning to do rate limiting for the average user. But we occasionally se multiple single websocket connections doing >500 requests per second and the node is not able to keep up with the chain anymore because of the high load.

Would be nice to have two flags to apply rate limiting to individual websocket connections, --rpc-rate-limit (in seconds), --rpc-rate-limit-burst

@GauravDhak
Copy link

hey @tugytur can you give more insight about this issue

@xlc
Copy link
Contributor

xlc commented Aug 9, 2023

I don't think Substrate/Polkadot will ever have this built in. That's why I am working on subway aims to implement this and many more necessary features for rpc node operation.

@GauravDhak
Copy link

@xlc if you need to help, please feel free to contact me

@bkchr
Copy link
Member

bkchr commented Aug 14, 2023

That's why I am working on subway aims to implement this and many more necessary features for rpc node operation.

Sounds like the way forward.

@bkchr bkchr closed this as completed Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants