-
Notifications
You must be signed in to change notification settings - Fork 33
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
[DVT-604] add adaptive rate limiting feature #60
Conversation
|
||
rl := rate.NewLimiter(rate.Limit(*ltp.RateLimit), 1) | ||
if *ltp.RateLimit <= 0.0 { | ||
if *ltp.AdaptiveRateLimit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks gucci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - happy to try this out today. Some minor changes might be worth while as noted.
Description
adds dynamic rate limiting in the AIMD fashion. more specifically, we periodically query the rpc tx_pool status to gauge whether we should increase or back off our loadtest request rate.
Jira / Linear Tickets
https://polygon.atlassian.net/browse/DVT-604
Testing
successfully builds and running against dev geth locally via following cmd:
`polycli loadtest --verbosity 700 --chain-id 1337 --concurrency 1 --requests 2000 --adaptive-rate-limit=true --steady-state-tx-pool-size 100 --adaptive-rate-limit-start 5 --adaptive-rate-limit-increment 10 --adaptive-cycle-duration-seconds 20 --mode t http://127.0.0.1:8545
log sample results: