status-go icon indicating copy to clipboard operation
status-go copied to clipboard

Implement rate limiting for ethereum client used in status-go

Open dshulyak opened this issue 6 years ago • 2 comments

Problem

Infura implements back pressure and returns 429 Too many requests when client reaches certain amount of rps (?). Currently we are using naive implementation that won't consider any kind of such feedback.

Implementation

Implement rate-limited client on top of ethereum.rpc.Client that will discard requests above configured rps. It must be easily consumable to ethereum.ethclient.Client.

For rate-limiting itself we can use any bucket rate limited algorithm.

dshulyak avatar Jun 01 '19 07:06 dshulyak

Also we should swtich infura urls to newer per project URLs (https://blog.infura.io/infura-dashboard-transition-update-c670945a922a) . they provide faster response and request that use them are prioritized during high network traffic.

i tried to use them and client definitely more reliable with them

dshulyak avatar Jun 01 '19 09:06 dshulyak

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

status-github-bot[bot] avatar Aug 05 '21 16:08 status-github-bot[bot]