Do as-user requests count for that user's rate limit? - box-api

In How to enhance Box.com API requests limit, it's explained that each user gets its own rate limit. Does this apply only when the request is sent from the user itself, or also when an admin sends the request as the user? Eg, if my admin account sends 25000 requests as user A, and 25001 requests as user B, will it be rate limited?

There are two kinds of rate limiting to consider:
Requests per second: this is applied on a per user (account) basis. If you are making n API calls per second on behalf of user A, you can concurrently make n calls per second on behalf of user B without being rate-limited. These limits are not published but you can learn more about them if you're a paying customer.
Total requests per day: The developer terms of service state that this is "currently set at a limit of 50,000 requests, collectively, for all of Developer's Applications, applied in a rolling 24-hour window." Per the linked question above I don't think the 50K ceiling is enforced. But it's in the ToS so it could be enforced at any time.

Related

User based rate limit implementation

I have an express.js backend server, and I am using MySQL to store the users' information. I want to implement an API rate limit that limits a certain number of requests a user can make in a minute; however, if I store the request count per minute in a database and get the count every time an API request is made, this system can easily be abused. Is there a better way to do this?

Trying to create a local copy of our google drive with rclone bringing down all the files, constantly hitting rate limits

As the title states, I'm trying to create a local copy of our entire google drive, we currently are using it as a file storage service which is obviously not the best use-case, but to migrate else where I of course need to get all the files, the entire google drive is around 800gb~.
I am using rclone specifically the copy command to copy the files FROM google drive TO the local server, however I am constantly running into user Rate Limit errors.
I am using a google service account to authenticate this as well, which I believe should provide more usage limits.
2021/11/22 07:39:50 DEBUG : pacer: low level retry 1/10 (error googleapi: Error 403: User
Rate Limit Exceeded. Rate of requests for user exceed configured project quota. You may
consider re-evaluating expected per-user traffic to the API and adjust project quota
limits accordingly. You may monitor aggregate quota usage and adjust limits in the API
Console: https://console.developers.google.com/apis/api/drive.googleapis.com/quotas?
project=, userRateLimitExceeded)
But I don't really understand since according to my usage it is not even coming close, I am just wondering what exactly can I do to either increase my rate limit (even if that means paying) or is there some sort of solution to this issue? Thanks
Error 403: User
Rate Limit Exceeded. Rate of requests for user exceed configured project quota.
User rate limit is the number of requests your user is making per second. its basically flood protection. You are flooding the server. It is unclear how google calculates this, beyond the 100 requests per user per second. If you are getting the error there is really nothing you can do besides slow down your code. Its also unclear from your question how you are running these requests.
If you could include the code we could see how the requests are being preformed. How ever as you state you are using something called rclone so there is no way of knowing how that works.
Your only option would be to slow your code down if you have any control over that though this third party application. If not you may want to contact the owner of the product for direction as to how to fix it.

Amazon API submitting requests too quickly

I am creating a games comparison website and would like to get Amazon prices included within it. The problem I am facing is using their API to get the prices for the 25,000 products I already have.
I am currently using the ItemLookup from Amazons API and have it working to retrieve the price, however after about 10 results I get an error saying 'You are submitting requests too quickly. Please retry your requests at a slower rate'.
What is the best way to slow down the request rate?
Thanks,
If your application is trying to submit requests that exceed the maximum request limit for your account, you may receive error messages from Product Advertising API. The request limit for each account is calculated based on revenue performance. Each account used to access the Product Advertising API is allowed an initial usage limit of 1 request per second. Each account will receive an additional 1 request per second (up to a maximum of 10) for every $4,600 of shipped item revenue driven in a trailing 30-day period (about $0.11 per minute).
From Amazon API Docs
If you're just planning on running this once, then simply sleep for a second in between requests.
If this is something you're planning on running more frequently it'd probably be worth optimising it more by making sure that the length of time it takes the query to return is taken off that sleep (so, if my API query takes 200ms to come back, we only sleep for 800ms)
Since it only says that after 10 results you should check how many results you can get. If it always appears after 10 fast request you could use
wait(500)
or some more ms. If its only after 10 times, you could build a loop and do this every 9th request.
when your request A lot of repetition.
then you can create a cache every day clear context.
or Contact the aws purchase authorization
I went through the same problem even if I put 1 or more seconds delay.
I believe when you begin to make too much requests with only one second delay, Amazon doesn't like that and thinks you're a spammer.
You'll have to generate another key pair (and use it when making further requests) and put a delay of 1.1 second to be able to make fast requests again.
This worked for me.

Maximum number of requests for free tariff on openshift

I use the free tariff for the openshift of backend my application.
In the example given on page https://www.openshift.com/products/pricing load of the following characteristics:
15 pages / second
Hundreds of articles
~ 50k visitors per month
but does that mean that the application will be disabled until next month, if the number of requests to it are exceeding the allowable number? and if so, what is the number?
That does not mean the application will be disabled. That is just letting you know about the amount of traffic that a small gear can handle.

Is Google map geocoding limited to 2500 per day or per 24 hours?

Does anyone know if the limit touches an entire day or a period of 24 hour starting from the first request you do and until tomorrow at the same hour in the day?
Example:
I make 2500 request today from 14h00 to 19h00.
Result:
Tomorrow at 2h00AM I will be able to make more request?
OR
I have to wait until 19h00 tomorrow before I can make more request?
Thank you.
According to the documentation, the usage limits are :
Users of the free API: 2,500 requests per 24 hour period.
Maps for Business customers: 100,000 requests per 24 hour period.
We are speaking about a 24 hour period, so in your example, if you make 2500 requests from 2PM to 7PM, you won't be able to do any request since tomorrow 7PM.
I found another page where they talk about the rate and daily limit.
Usage Limits for Google Maps API Web Services
Sending too many requests per day. Sending requests too fast, i.e. too
many requests per second. Sending requests too fast for too long or
otherwise abusing the web service.
If you exceed the usage limits you will get an OVER_QUERY_LIMIT status
code as a response.
This means that the web service will stop providing normal responses
and switch to returning only status code OVER_QUERY_LIMIT until more
usage is allowed again. This can happen:
Within a few seconds, if the error was received because your
application sent too many requests per second.
Some time in the next 24 hours, if the error was received because your application sent too many requests per day. The time of day at
which the daily quota for a service is reset varies between customers
and for each API, and can change over time.
Upon receiving a response with status code OVER_QUERY_LIMIT, your
application should determine which usage limit has been exceeded. This
can be done by pausing for 2 seconds and resending the same request.
If status code is still OVER_QUERY_LIMIT, your application is sending
too many requests per day. Otherwise, your application is sending too
many requests per second.
On the same page there is also a video.
:-)
Maps API for Business: Using the v3 Geocoding API
Update: The limit is now 5000 queries per day for the free tier.