bim360appstore-data.management-nodejs-transfer.storage icon indicating copy to clipboard operation
bim360appstore-data.management-nodejs-transfer.storage copied to clipboard

Handle "Too Many Requests" on postLambdaJob

Open augustogoncalves opened this issue 7 years ago • 2 comments

As specified on the AWS API Gateway Throttling limit

augustogoncalves avatar Jul 20 '17 21:07 augustogoncalves

https://www.npmjs.com/package/queue may help solve this

augustogoncalves avatar Aug 02 '17 18:08 augustogoncalves

The storage services also have throttling that we have to take care of. They all provide different error codes and messages, but one thing is common, they all add a "Retry-After" header to the response with the number of seconds to wait before retrying the request. So I think that's what the lambda service should do: in case of error during transfer, look for that header value. If it's there then retry the call after the given amount of delay, if it's not there then just fail as it already does.

adamenagy avatar Sep 12 '17 22:09 adamenagy