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

Throttle Eth_ module queue #5945

Merged
merged 10 commits into from
Jul 21, 2023
Merged

Throttle Eth_ module queue #5945

merged 10 commits into from
Jul 21, 2023

Conversation

MarekM25
Copy link
Contributor

@MarekM25 MarekM25 commented Jul 19, 2023

Fixes #5923

With spam testing

Before change:
Requests per second: 100
Requests sent in total: 100000
Succeeded requests: 4818
Failed requests: 95182

After the change:
Requests per second: 100
Requests sent in total: 100000
Succeeded requests: 57566
Failed requests: 42434

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

We did load testing with eth_call and testing on gateway infra

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

Auto-updated with a new config parameter. However, would be great to introduce articles Nethermind for RPC Providers

Requires explanation in Release Notes

  • Yes
  • No

ToDo...

Remarks

Optional. Remove if not applicable.

@benaadams benaadams changed the title [WIP] Eth calls experiments Throttle Eth_call queue Jul 20, 2023
Copy link
Member

@benaadams benaadams left a comment

Choose a reason for hiding this comment

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

Would change to Queue rather than Pending; as pending suggests in process but waiting for result.

Also MaxPendingNonSharedRequests => RequestQueueLimit; as other is a confusing description

src/Nethermind/Nethermind.JsonRpc/JsonRpcConfig.cs Outdated Show resolved Hide resolved
src/Nethermind/Nethermind.JsonRpc/IJsonRpcConfig.cs Outdated Show resolved Hide resolved
src/Nethermind/Nethermind.Init/Steps/RegisterRpcModules.cs Outdated Show resolved Hide resolved
src/Nethermind/Nethermind.JsonRpc/IJsonRpcConfig.cs Outdated Show resolved Hide resolved
@MarekM25 MarekM25 changed the title Throttle Eth_call queue Throttle Eth_ module queue Jul 20, 2023
@MarekM25 MarekM25 marked this pull request as ready for review July 20, 2023 16:16
nameof(IEthRpcModule.eth_uninstallFilter) + "). " +
" If value is set to 0 limit won't be applied.",
DefaultValue = "500")]
int RequestQueueLimit { get; set; }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benaadams it is only for non-shared methods, shouldn't we mention it in the config name?

Copy link
Member

Choose a reason for hiding this comment

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

Mentions the calls its for in the description?

User wouldn't understand what "non-shared" methods are; is an implementation detail?

@MarekM25 MarekM25 merged commit d56d659 into master Jul 21, 2023
66 of 67 checks passed
@MarekM25 MarekM25 deleted the eth_call_experiments branch July 21, 2023 10:28
@MarekM25 MarekM25 mentioned this pull request Jul 21, 2023
16 tasks
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.

"Unable to rent an instance of IEthRpcModule. Too many concurrent requests." error in response
2 participants