Stability testing of REST API - rest

I have a registration REST API which i want to test as -
Register 15000 users and pound the server with repeated incident reports (varying traffic with max being 100 per minute, min being 1 per 24 hrs and avg being one per minute ) over a period of 48 hours.
Which tool can I use to test stability of my REST API?

For pounding the server with incidents over a period of time, you can use http://runscope.com/ .
It is helpful for testing APIs. You can just trigger events in runscope over a period time or schedule it to hit the server as required.

Related

Azure Maps Routing Not Accurate For Duration

If I use Bing Maps Api to calculate a journey from A to B at a specific time where I know of heavy traffic on this route I get an accurate journey duration of 24 Min delay due to heavy traffic 44 Mins in total. If I use the Azure Maps Routing Api
https://atlas.microsoft.com/route/directions with
routeType=fastest
traffic=true
travelMode=car
and exact same time departure date time I am not getting an traffic delay I get duration of 20.9 Mins. I understand that the data comes from Tom Tom which is different from Bing. It seems that the Azure routing is just not accurate when compared to Bing. May be I am doing something wrong?
EDIT:
Here is my example Monday 14th Jan 2019 07:30 in Azure Maps using postman:
https://atlas.microsoft.com/route/directions/json?subscription-key=xxx&api-version=1.0&query=50.795225,-1.117809:50.850064,-1.071691&departAt=2019-01-14T07:30:00&travelMode=car&&traffic=true
Any non holiday monday is fine the route has to be in the future. This route is very traffic congested at this time 07:30.
If the put the same route into Bing maps you traveltime is
58 mins with 30 mins due to traffic.
With azure routing:
"routes": [
{
"summary": {
"lengthInMeters": 19357,
"travelTimeInSeconds": 2166,
"trafficDelayInSeconds": 0,
"departureTime": "2019-01-14T07:30:00Z",
"arrivalTime": "2019-01-14T08:06:05Z"
},
30 mins and no delay due to traffic.
Not getting any delay due to trafiic!
TomTom result does not explicitly show delays. Delays resulting from historic travel information are however included in travel time. As comparison from of Bing and TomTom routes (Start: 50.795225,-1.117809 ,Destination: 50.850064,-1.071691 , Departure: Jan 14 2019, 07:30). Results:
Bing;
Route length; 21 km
Travel time: 41 min
Delay: 11 min
Azure Maps/TomTom:
Route length; 19,35 km
Travel time: 36 min
Delay: 0 min
To get delay resulting from historic traffic information, routing parameter "&computeTravelTimeFor=all" needs to be added. This will not directly return delay from historic traffic, but travel times without any delays, travel time including delays from historic traffic info, travel time including delays from historic plus live traffic info

Getting QuotaExceededException - What are the operation quota limitations for Azure Notification Hubs?

I was doing some latency/performance testing for sending push notifications with Azure Notification Hub by consecutively sending many notifications in a foreach loop. It worked fine for 100 "SendNotification" requests, altough it was relatively slow (14s), but I got a QuotaExceededException for 1000 requests in a row:
[QuotaExceededException: The remote server returned an error: (403)
Forbidden. The request was terminated because the namespace
pushnotification-testing is being throttled. Please wait 60 seconds
and try again. TrackingId:...
Even when I don't wait for 60 seconds as advised, I can again execute 100 consecutive requests, but 1000 requests in a row always fail... Anything slightly above 100 consecutive requests fails most of the time...
I couldn't find any documentation on these limitations. This should be documented somewhere, so I can be sure Azure Notification Hubs will fit my needs.
The answer to this question says
There is a throttling for CRUD operation's rate. Quotas depend on tire
your are but it is not going to be less then 2000 operations per
minute per namespace any way. If quota is exceed then service returns
403.
For me, it seems to be less then 2000 operations. By the way, I'm using "FREE" tier for testing, but I guess we would switch to "STANDARD" for production.
Has anyone similar experiences or knows where to look for more information?
In particular, what are the operation quota limitations per timefram for the different tiers of Azure Notification Hubs?
UPDATE1: It's weird, but I sending 1000 requests in parallel works most of the time, but consecutively it fails on the 101st request.
For my best knowledge for right now NH has following limitations on number of SENDS (not registrations) per namespace per minute per NH machine:
Free tire: 100
Basic tire: 900
Standard tire: 11500
Massive sending in parallel allows to send more because calls are very likely to be routed on different machines.

azure mobile service custom api script http request timeout

I implemented exports.get = function(request,response) of a custom api on a mobile service of azure. I download 5 thousands records from the rest service and then i prepare the json for the output. The problem is that the time of downloading of all records is too long, for that script exceeds the default timeout of 30 secs. I was thinking if there is a way to increase the timeout of the response.
I don't believe you can have a timeout greater than 30 seconds, as I have encountered this problem myself with azure custom APIs. According to this link https://msdn.microsoft.com/en-us/library/azure/dd894042.aspx, Table operations are limited to 30 seconds, but it's not clear if that applies to custom apis, but it certainly appears to be.
What I would recommend is to implement pagination and return a limited number of records at a time. Your parameters should include the the start index and amount of records to return, and your response should include how many records in total so you can determine how many records to fetch with each request.

Maximum rate at which fql requests can be made

Hi what is the maximum rate at which fql requests can be made ?
e.g. 1000 FQL requests per day ?
I'm building an app where I will be making alot of FQL requests and I need to know what the limit is.
Limit on number of Graph API calls
I've found 600 calls per 600 seconds, per token & per IP to be about
where they stop you.
https://developers.facebook.com/policy/
If you exceed, or plan to exceed, any of the following thresholds
please contact us as you may be subject to additional terms: (>5M MAU)
or (>100M API calls per day) or (>50M impressions per day).

What do we mean by "top percentile" or TP based latency?

When we discuss performance of a distributed system we use the terms tp50, tp90, tp99.99 TPS.
Could someone explain what do we mean by those?
tp90 is a maximum time under which 90% of requests have been served.
Imagine you have times:
10s
1000s
100s
2s
Calculating TP is very simple:
sort all times in ascending order: [2s, 10s, 100s, 1000s]
find latest item in portion you need to calculate. For TP50 it will ceil(4*.5)=2 requests. You need 2nd request. For TP90 it will be ceil(4*.9)=4. You need 4th request.
get time for the item found above. TP50=10s. TP90=1000s
Say if we are referring to in-terms of performance of an API, TP90 is the max time under which 90% of requests have been served.
TPx: Max response time taken by xth percentile of requests.
time taken by 10 requests in ms [2,1,3,4,5,6,7,8,9,10] - there are 10 response times
TP100 = 10
TP90 = 9
TP50 = 5