If you don't find an answer, please click here to post your question.
Reply
Occasional Contributor
Posts: 7
Registered: ‎08-16-2017

Slow GET request for v3 IQ API

Is it normal for GET requests to take a long time? 

It doesn't seem to matter how larger the returned results are.  Even a returned JSON record of about 500 characters seems to take a while.  It fluctuates, but it is often on the order of 1 second, and at times it seems to "stall" and take 5 to 10 seconds to complete the GET request.  Trying to access the performance API server doesn't seem to help.

My ping time to api.ooyala.com is less than a millisecond (average of about 0.6 ms).

I am using the python "requests" package to perform the GET request.  Any thoughts on how I can track down where the issue is?

 

Ooyalan
Posts: 116
Registered: ‎02-03-2014

Re: Slow GET request for v3 IQ API

Hi, what's the API query you are using? The response time is related to the query complexity.

Looking into the API call you are using, will give me a better sense of how complex it is, and probably will help me to provide you a better way to do it.

Let me know.

Thanks.
Occasional Contributor
Posts: 7
Registered: ‎08-16-2017

Re: Slow GET request for v3 IQ API

Here's an example of one I have been using, although I am getting a 503 error at the moment when I try to execute the request:

 

https://api.ooyala.com/v3/analytics/reports?sort=displays&filters=asset_type%3D%3D%27live%27%2Casset... api key>&start_date=2017-8-26T0%3A0&signature=<my signature>

Ooyalan
Posts: 116
Registered: ‎02-03-2014

Re: Slow GET request for v3 IQ API

Could you please provide me with the API key (just API key) to verify a couple of things on your account?

Thanks.
Ooyalan
Posts: 116
Registered: ‎02-03-2014

Re: Slow GET request for v3 IQ API

I'm executing the following API call (which is the same that you provided) from Scratchpad

 

/v3/analytics/reports?sort=displays&filters=asset_type%3D%3D%27live%27%2Casset%3D%3D%27TT_main%27&end_date=2017-8-26T0%3A15&expires=1504289691&metrics=displays%2Cplays_requested%2Cvideo_starts%2Creplays%2Cplaythrough_25%2Cplaythrough_50%2Cplaythrough_75%2Cplaythrough_100&report_type=performance&dimensions=asset&page=0&limit=5&start_date=2017-08-26

 

And it's not taking more than 1 sec to return the data. Could you please try to reproduce it from there? I just want to confirm this is not about how you are creating the API call or a network condition on your end. 

 

Please confirm. 

 

Thank you. 

Occasional Contributor
Posts: 7
Registered: ‎08-16-2017

Re: Slow GET request for v3 IQ API

I can't access a browser from the remote server I'm working on (text mode only), but I did try from the local machine. 

Trying that same request on the scratchpad repeatedly, it sometimes is relatively quick (say 0.5 seconds or so), but occasionally will take several seconds.  One time it took abot 6 seconds before the result was returned.

 

I did try running a ping from the remote server (an amazon AWS server).

When I ping api.ooyala.com, the result is consistently about 1.5 ms.

When I ping cdn-api.ooyala.com, the latency is typically less than 1 ms.

 

Also, to take python out of the picture, I issue the same request using cURL 10 times in a row from the remote server with the following execution times:

1.432s

1.682s

3.132s

4.258s

2.153s

0.828s

3.010s

3.915s

0.599s

0.441s

Ooyalan
Posts: 116
Registered: ‎02-03-2014

Re: Slow GET request for v3 IQ API

Cool, I think this will requiere further investigation from our engineering team. Could you please file a support ticket in our support portal to send this over to our engineering team?

Please confirm.

Thanks.
Occasional Contributor
Posts: 7
Registered: ‎08-16-2017

Re: Slow GET request for v3 IQ API

Just submitted a ticket - thanks again!