You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to consume an API that iterates a folder and file structure and that has a limit of 2000 calls per 600 seconds.
I'm trying to come up with the best approach so that after the 600 seconds I am as close to using all 2000 calls possible without exhausting all the calls in the first 100 seconds and letting the user wait 500 seconds for the next update.
I've gone with this to start with, but after the 600 seconds were up I still had anywhere between 50 to 600 requests remaining meaning I was leaving performance on the table.
To note is that the API also returns how many requests I have left and how long until the next reset period if I can use those values somehow as well.
When my service is left to iterate a folder structure on it's own it's more like 50 requets remaining at the end, however if the time period included a time when the user was left to select some options before clicking start then it can be more like 600.
Basically I want it to start off with about 3 requests per second, then if for some reason it isn't going to get close to 0 calls left at the end have the ability to speed up and use all the available performance.
Can I reassign to the private field? Is it thread safe to do so? Could after every 100 calls used re-evaluate the remaining performance and regenerate the limiter?
e.g.
Hi,
I'm trying to consume an API that iterates a folder and file structure and that has a limit of 2000 calls per 600 seconds.
I'm trying to come up with the best approach so that after the 600 seconds I am as close to using all 2000 calls possible without exhausting all the calls in the first 100 seconds and letting the user wait 500 seconds for the next update.
I've gone with this to start with, but after the 600 seconds were up I still had anywhere between 50 to 600 requests remaining meaning I was leaving performance on the table.
To note is that the API also returns how many requests I have left and how long until the next reset period if I can use those values somehow as well.
When my service is left to iterate a folder structure on it's own it's more like 50 requets remaining at the end, however if the time period included a time when the user was left to select some options before clicking start then it can be more like 600.
Basically I want it to start off with about 3 requests per second, then if for some reason it isn't going to get close to 0 calls left at the end have the ability to speed up and use all the available performance.
Can I reassign to the private field? Is it thread safe to do so? Could after every 100 calls used re-evaluate the remaining performance and regenerate the limiter?
e.g.
The text was updated successfully, but these errors were encountered: