Vote count: 0
Currently I've setup a lambda function that is triggered from an api gateway end point. The goal was to keep response times low by forming the response and triggering the callback first, and then continuing on to interact with sns to pass of work to other lambda functions. However, I've been noticing some odd behavior when running blazemeter against the endpoint. Mainly the response times seem to continually increase, furthermore there are 502 and 504 response codes returned but no 500 response codes (which if i understand correctly, indicate invocation throttling since 429 response are mapped to 500 in api gateway). If i remove the asynchronous actions I see reasonable response times and and no errors. Why is this the observed behavior, does the order in which items get queued on the nodejs event loop not effect when the response is actually triggered or does lambda just wait for the event queue to empty out before sending the response? If the latter, then would errors in the async interaction be the cause of the 502 & 504 responses?
When does lambda + api gateway actually send a response to the client?
Aucun commentaire:
Enregistrer un commentaire