What is the latency of alexa skill - alexa-skill

I've developed a Alexa skill which communicate to my device through web socket and fetch some data. I'm getting 1689.847 ms in my logs to complete an API request. But on Alexa device its taking 3-4 seconds to respond back. Any one knows what is the minimum or maximum time for response.

In Lambda you can extend your execution time here
But it is not a good practice to make users wait for more than 3 to 5 seconds for the response. And the Alexa default timeout is 8 seconds so it automatically exits the skill if there is no response within 8 seconds.

Related

Azure App service has 230 seconds timeout, or does it?

Apparently, Azure App Service has a 230-second timeout.. However, when I look at my logs in App Insights' Request table, I see requests to my .NET API with 400-500 seconds duration that resulted in 200. On the other hand, I do see some 500s where the duration is over 230 seconds.
So my question is why do I see this discrepancy?
I can think of two theories:
Either, the 230 seconds is not always enforced.
Or the logs in the Request table in App Insight, show the information from what is returned from the app, and NOT the actual user experience. i.e. if, for example, my backend takes 300 seconds and returns a 200, then that's what I see in logs. However, the user got a 500 after 230 seconds.
Answering my own question in case anyone ran into this ...
I did some testing and confirmed that the 230s timeout is indeed enforced, i.e. the caller of the API would get a 500 after 230s if the API hasn't returned a response yet. However, the duration field in the logs' Request table indicates the time the app took to return a response, i.e. if the API takes 5 minutes to return a 200, the caller would get a 500 right after 230 seconds, however, in the logs, you'd see the request took 5 minutes.
That timeout is enforced on load balancer and its documented. But app service will continue to process your request it will only affect your client.
If you need to know when something completed then probably have a look into Asynchronous Request-Reply Pattern

Allow DialogFlow's response time for web-service-fulfillment to be greater than 5 seconds

According to Dialogflow Docs
The response must occur within 10 seconds for Google Assistant applications or 5 seconds for all other applications, otherwise, the request will time out.
Is there any way we can increase this without going for an API WebClient approach?
I am using the dialogflow web demo as web client and need to make a call to node service to fetch data from a cloud dB.
The following limitations apply to your response:
The response must occur within 10 seconds for Google Assistant
applications or 5 seconds for all other applications, otherwise the
request will time out.
The response must be less than or equal to 64 KiB in size.
How ever there will be,
Webhook call failed. Error: DEADLINE_EXCEEDED
So you must complate your task within 5 second. and if you are not able to fetch data within 5 second then there is something wrong with your infrastructure.

Limit of HTTPS request per seconds

I am doing a project where I need to send device parameters to the server. I will be using Rasberry Pi for that and flask framework.
1. I want to know is there any limitation of HTTPS POST requests per second. Also, I will be using PythonAnywhere for server-side and their SQL database.
Initially, my objective was to send data over the HTTPS channel when the device is in sleep mode. But when the device (ex: car) wakes up I wanted to upgrade the HTTPS to WebSocket and transmit data in realtime. Later came to know PythonAnywhere doesn't support WebSocket.
Apart from answering the first question, can anyone put some light on the second part? I can just increase the number of HTTPS requests when the device is awake (ex: 1 per 60 min in sleep mode and 6 per 60sec when awake), but it will be unnecessary data consumption over the wake period for transmission of the overhead. It will be a consistent channel during the wake period.
PythonAnywhere developer here: from the server side, if you're running on our platform, there's no hard limit on the number of requests you can handle beyond the amount of time your Flask server takes to process each request. In a free account you would have one worker process handling all of the requests, each one in turn, so if it takes (say) 0.2 seconds to handle a request, your theoretical maximum throughput would be five requests a second. A paid "Hacker" plan would have two worker processes, and they would both be handling requests, to that would get you up to ten a second. And you could customize a paid plan and get more worker processes to increase that.
I don't know whether there would be any limits on the RPi side; perhaps someone else will be able to help with that.

How long does it take for the app to time out and exit the conversation

How long does it take for the google assistant agent to timeout and end/leave the conversation?
I configured a chat bot with actions-on-google where
The GA would ask user to choose which product to buy from a List.
Then the user locked the phone's screen
After a few minutes, the user reactivates google assistant again
User selects one of the product from the list by scrolling up the history
The transaction proceeds
I expected the app to exit the conversation after a certain duration, which then start a new session.
The session stays alive for 10 minutes. So, if you resume conversation within 10 minutes then it will continue in the same session.
As per my testing on Google Assistant and Simulator, if the conversation is paused for more than 10 minutes then the conversation ends and app exits.
5 seconds.
Source: Google's documentation
("Your response must occur within about 5 seconds or the Assistant assumes your fulfillment has timed out and ends your conversation.")
If there is a 5 second limit to receive the response, is there a limit to how long the response can be? We want to access longer form responses and then (hopefully) process the text response
It's actually 10 seconds or that's what this says.
I don't know if it's the same time for legacy actions or conversational actions.

Instagram API calls limit

Dear Instagram developers team,
Our team is currently in the design phase of a connector to Instagram API for our application.
We bumped into a few questions related to the Instagram API limits.
Would you consider the following scenario as a bad practice?
use all 60 per hour calls for an endpoint until connector receives a 429 response code form the Instagram API
when the first 429 response is received the connector stops calling the Instagram API for 5 minutes, then try again
If the response was successful, continue from step #1, if not - increase 'sleeping time' by 5 minutes each attempt until the call is
successful and then continue from step #1
How many calls that return 429 code our connector can make in an hour
so its behavior would not be considered spammy? Can we make lets say
20 such calls in a row? The question raised because of the very last
sentence on the limits page.
You may also receive responses with an HTTP response code of 400 (Bad Request) if we detect spammy behavior by a person using your
app. These errors are unrelated to rate limiting.
Per hour limit means that at the beginning of an hour the entire limit is
reset or it means that once an API call is made, the available limit will be increased by one after one hour? The second scenario means that if I made 30 calls in one minute and then another 30 after half an hour, when one hour plus one minute passes from the first call only 30 calls will be available.
Is there a way to increase limits for POST or DELETE calls?
Thank you

Resources