-
-
Notifications
You must be signed in to change notification settings - Fork 8k
rolling window rate limiter #25423
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
Open
caoilainnl
wants to merge
48
commits into
ccxt:master
Choose a base branch
from
caoilainnl:rolling-window-rate-limiter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+420
−64
Open
rolling window rate limiter #25423
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
99b74e6
rolling window rate limiter
caoilainnl d08ed7a
rollingWindowRateLimiter for other languages
caoilainnl c21347f
C# rate limiter fix
caoilainnl eb26af7
python rate limiter fix
caoilainnl 2f29eaf
rollingWindowLoop fixes
caoilainnl 55e493d
ratelimiter go fixes
caoilainnl e0a6de7
go throttler is lock safe
caoilainnl aad1d09
go rate limiter fix
caoilainnl 01d61f7
Merge branch 'master' into rolling-window-rate-limiter
caoilainnl 1b3b430
Merge branch 'master' into rolling-window-rate-limiter
caoilainnl 0d554a1
Update cs/ccxt/base/Exchange.BaseMethods.cs
ttodua ef9cf93
Update cs/ccxt/base/Exchange.BaseMethods.cs
ttodua b760ac6
Update cs/ccxt/base/Exchange.BaseMethods.cs
ttodua 6f70fa8
Update cs/ccxt/base/Exchange.BaseMethods.cs
ttodua 70ae641
Update cs/ccxt/base/Throttler.cs
ttodua 26f2c6c
move out of lock
ttodua 9b4e539
Merge branch 'rolling-window-rate-limiter' of github.com:caoilainnl/c…
ttodua 87a6264
tokens > cost
ttodua 833b96e
updates
ttodua 718f665
Update cs/ccxt/base/Throttler.cs
ttodua 28e1081
Update cs/ccxt/base/Throttler.cs
ttodua 3f108d0
var change
ttodua e7be89c
rev go formatting
ttodua f0abc26
Merge branch 'master' into rolling-window-rate-limiter
caoilainnl 7dcc605
Update ts/src/base/functions/throttle.ts
caoilainnl dac6a77
Update cs/ccxt/base/Throttler.cs
caoilainnl 97bbd32
removed lock from leaky bucket loop
caoilainnl 573861f
Merge branch 'rolling-window-rate-limiter' of https://github.com/caoi…
caoilainnl fdabf94
throttler config typed object
caoilainnl 8290df6
rev
ttodua d88fabf
min
ttodua 09498f5
spacing
ttodua eca3391
ts simplify
ttodua c0df892
php clauses
ttodua 361340d
use sleep in php
ttodua 35a4b53
Merge branch 'master' into rolling-window-rate-limiter
ttodua 587c69b
-
ttodua d9f82ad
-
ttodua 868dbe5
simplify php
ttodua 19a90e0
optimizations - ts, php, py
ttodua 1fe42b8
Update cs/ccxt/base/Throttler.cs
caoilainnl c967782
Update cs/ccxt/base/Throttler.cs
caoilainnl 1bee5c4
Update cs/ccxt/base/Throttler.cs
caoilainnl a2db733
Update cs/ccxt/base/Throttler.cs
caoilainnl b1e81f0
throttler updates
caoilainnl 5beff86
sleep fix
ttodua 3cab749
Merge branch 'rolling-window-rate-limiter' of github.com:caoilainnl/c…
ttodua 0e6588d
Merge branch 'master' into rolling-window-rate-limiter
ttodua File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@carlosmiei what about having ConcurrentList here instead of the regular list? or SlimList even?
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.
I might have to look into this more, I've read a little bit about it and it looks like right now, timestamps is single-threaded, so a plain List is fine (and slightly faster). Switching to a concurrent collection should only happen if the list is to run outside rollingWindowLoop() as well (which I don't think it ever would)
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.
I think it's better to use a regular list. I haven't run into concurrency issues using it yet, and it looks like a plain List is slightly faster
Uh oh!
There was an error while loading. Please reload this page.
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.
If it is needed, I created thread safe timestamps on caoilainnl@d1feae0 , I don't think it is though because theres only 1 iteration of the rollingWindowLoop executing at a time, and the timestamp list isn't accessed anywhere else (other than NewThrottler, which is only called once)
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.
@carlosmiei do you think a thread safe timestamp list would be useful?