Calculate or estimate the rate limit of a black-box API - api

Is there any procedure or algorithm to calculate or estimate rate limit of a black-box API which doesn't have any documentation or maintainer to ask about?
Some information that may help:
I started with sending 1 request every 1 minute and after 115
requests, I get blocked.
Second time, I sent 1 request every 2 minutes and after 95 requests,
I get blocked.

Related

User simulation with jmeter for stress and scalability testing

Hi there I am trying to conduct stress and scalability testing for a web application. One of the problem is that it is not clear how many users the website can handle. So first I am conducting a stress testing with different user number. Consider below picture:
In the picture first I am starting with 100 user by gradually increasing the load. So i have requirement for example:
Response time should not be 7 sec
throughput should not fall under 35 request per second
Percentage of error should not be more than 10 percent of the total request
So if this 100 user satisfies the requirement I will continue the test with 150 user and will go on until it breaks at least 2 requirement out of 3. And with that user I will perform the scalability test. Is this approach right? Please give me advise and how should I simulate user if not right?
The approach is more or less right. However you could save your time and efforts for finding the breaking point of the system with a single test only, just start with 1 user and gradually increase the load until the maximum.
JMeter's theoretical limit for a single Thread Group is 2,147,483,647, your actual limit will be less as most probably your hardware resources are limited, check out What’s the Max Number of Users You Can Test on JMeter? article for more details.
Whatever, if you put a reasonably high number of threads in the Thread Group and configure the load to increase gradually you can run your test and pay attention to the following charts:
Active Threads Over Time - shows the number of active users
Response Times Over Time - shows the system response time
Transactions Per Second - shows the throughput (the number of requests per second)
At first stage of the test response time will be the same and the throughput will be growing as you increase the load. At the certain point of test the response time will start increasing and throughput will be going down - that would be the limit of your system (so called "bottleneck")

Google Sheets API Quota Exceeding

I am creating a Python script that gets information from one API and after some formatting and etc it writes the data in a spreadsheet in Google Sheets. I am using the Gspread library and the script is working tho there is one issue that is actually a 'dealbreaker'. The G Sheets API has limitations of read and write requests per minute or per 100 seconds. The limit is 100 requests per 100 seconds per user. I've been monitoring my request and I have never exceeded this limitation but I get the 429 error - "requests quota exceeded".
So my question would be, could it be the case that 100 request per 100 seconds resonates to 1 request per 1 second so that when my script does 2 or more request in 1 second the 429 error is raised?
What lead me to the thought this could be the case is that I tried using time.sleep with many different values so that I make sure I never exceed even 60 requests per minute but I am still getting the 429 error raised.
It has a spam protection system which limits to 10 requests per second.
I found out after hours of searching, I was stuck at the same.
You can delay your calls and prevent that.

HERE Api - Daily limit of requests has been reached - but on plan description doesn't mention that

I recently subscribed on HERE Api for Freemium account, cause as far as I understood, I could make 250k requests per month and only would be charged after that, recently I'm working on Waypoints Sequence, and suddenly during a dev test, I got the error "Daily limit of 10 requests has been reached".
I thought that the limit was 250k requests per month, but then I read that the user can only make 10 requests per day by App ID, but makes no sense when the month limit is significantly higher.
Out of Freemium Account there's only the Pro/Premier Plans, which are actually very expensive for me right now.
Does anyone have a workaround for this? Or have another "Waypoints Sequence" tool to recomend?
Thank you all in advance
Currently, for Freemium plans only, the following limits apply:
Custom Locations: you may upload a maximum of 3 layers with a maximum of 100 polygons or polylines.
Waypoints Sequence: up to 10 requests per day.
Advanced Data Sets: up to 100 requests per hour and 1,000 per day.
Please contact our Sales team (Contact Sales) if you want to raise your limits. Thank you.

Enterprise or Self-Service API - Request suggestion

I'm in the process of devolving a new tool for a company app. The tool will be sending homogeneous number of searches to amadeus API. Is every search result is considered as a request? A sample search of a user will have to search the api 1000 times are these searches considered as requests? Because if the company has 10000 request limit per month it's going to be over by 10 users! I need to understand this please.
Every time you call an API (every time you use GET/POST verb) you do a "request".
The limitation (quota) is only in the test environment, you don't pay for it but you have a limited number of calls and you only have access to a subset of data.
In production, you don't have any limitation on the total number of queries you can do. You get access to our full set of data (live) but you pay per use (you pay for each request you do).
You have a limitation on the number you can do per second (TPS: 10 in production / 5 in test).

AWS Rekognition API call per/time limit

I have been searching for a while, but have not found any information on whether there are limits on calls to Amazon Rekognition service.
Does anyone know the numbers, or any source where I can look?
What I want to know is if they limit the number of calls allowed per minute or second. I'm looking for information on the the paid (not free) service tier.
You can find documentation on service limits for Rekognition at https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_rekognition.
The limits vary depending on which API you are accessing and from which region. Ex. DetectLabels has a limit of 5 transactions per second in US East (Ohio). You may request a limit increase on these numbers.
Here are the limits they have, at no time says anything about maximum number of requests per second as in other services
For example in amazon polly if it says the limits it has per second:
Any 2 transactions per second (tps) from these operations(DeleteLexicon, PutLexicon, GetLexicon, ListLexicons) combined.
Maximum allowed burst of 4 tps.
That's why I believe that it has no operations limit per minute, otherwise I would put it as they do in other services. I am using it to authenticate in the company where I am, that we are 23 and at the moment it has not given me any problems of operations per second.
References:
http://docs.aws.amazon.com/rekognition/latest/dg/limits.html
http://docs.aws.amazon.com/polly/latest/dg/limits.html