Implement gas throttle mechanism in web3 #8017
Labels
epic
Type: Large user story that encompasses multiple tasks
limechain
Work planned for the LimeChain team
performance
web3
Area: Web3 API
work package
Limechain Work package
Milestone
Problem
Currently in
hedera-mirror-web3
we handle large traffic by using a fixed amount of transactions per second for all users combined, which are rate limited. Although this approach is working, we can further optimise the number of requests, which are processed by using a gas per second as a throttle.Solution
We can implement a mechanism which counts how much gas the EVM has processed for a second and throttle the responses when we reach a certain amount of gas. In this way, if the users are sending very light-weight transactions we can handle a lot larger number compared to the fixed amount of rate limit, which treats all transactions the same. Analogically, if the majority of users are performing very gas heavy operations, the requests that could be handled per second would be lowered.
In this way the Archive Node would handle requests in a more flexible way and would be easier to scale.
In addition we can finish some copy mismatches between services mono code and hedera-mirror-web3.
Tasks
The text was updated successfully, but these errors were encountered: