Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thtrottle all RPC modules #5957

Merged
merged 5 commits into from
Aug 11, 2023
Merged

Thtrottle all RPC modules #5957

merged 5 commits into from
Aug 11, 2023

Conversation

MarekM25
Copy link
Contributor

Changes

This is a continuation of #5945 but for all RPC modules. Testing - ToDo

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

If yes, link the PR to the docs update or the issue with the details labeled docs. Remove if not applicable.

Requires explanation in Release Notes

  • Yes
  • No

If yes, fill in the details here. Remove if not applicable.

Remarks

Optional. Remove if not applicable.

# Conflicts:
#	src/Nethermind/Nethermind.Init/Steps/RegisterRpcModules.cs
#	src/Nethermind/Nethermind.JsonRpc/Modules/BoundedModulePool.cs
#	src/Nethermind/Nethermind.JsonRpc/Modules/IRpcModuleProviderExtensions.cs
@MarekM25 MarekM25 changed the title [WIP] Thtrottle all RPC modules Thtrottle all RPC modules Aug 10, 2023
@MarekM25 MarekM25 marked this pull request as ready for review August 10, 2023 13:39
private bool RequestLimitEnabled => _requestQueueLimit > 0;

public BoundedModulePool(IRpcModuleFactory<T> factory, int exclusiveCapacity, int timeout, int requestQueueLimit = 0)
public static class RpcLimits
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer it not to be static, but for example owned by rpcModuleProvider and injected to modules from there.

@MarekM25 MarekM25 merged commit d3dc320 into master Aug 11, 2023
64 checks passed
@MarekM25 MarekM25 deleted the bugfix/throttle_for_all_rpc branch August 11, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants