Skip to content

pre-fill burst token bucket - #8

Open
mccraigmccraig wants to merge 1 commit into
brunoV:masterfrom
mccraigmccraig:prefill-bucket
Open

pre-fill burst token bucket#8
mccraigmccraig wants to merge 1 commit into
brunoV:masterfrom
mccraigmccraig:prefill-bucket

Conversation

@mccraigmccraig

Copy link
Copy Markdown
Contributor

this permits bursting to start immediately

i have an API with constraints -

50 calls per minute
2500 calls per day

i've modelled this with a throttle-fn for the per-minute constraint around a throttle-fn for the per-day constraint... problem is that even if i allow bursting on the per-day constraint i never get to use my 50 calls a minute without waiting for an age for the per-day constraint bucket to fill

this patch allows the per-day bucket to be pre-filled, so i can happily use my 50 calls per-minute until i've exhausted my per-day calls

this permits bursting to start immediately
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.

1 participant