Best practices for long-running API Gateway requests

0

API Gateway has a max connection of 29 seconds. A customer would like to use API Gateway for longer-running requests. What can we provide in terms of best practices to achieve this? My initial thoughts are around making the request "job based" (short lived POST, then GET polls to get job status) but that requires rearchitecting their application and adding job state.

Do we have blog posts or whitepapers to recommend best practices around this?

1개 답변
0
수락된 답변

29 sec is the max timeout as of now which works for a majority of use cases. It would be better if you explain what kind of request is it that lasts more than 29 secs. Keep in mind that there might be proxies in the path whose timeout you may not be able to control.

ALB does not have such a limit. It might be a better solution in this case, without knowing anything else. But you won't benefit from rate limiting, throttling, API Keys, etc.

Separating request into POST and then GET polling is an alternative. WebSockets might be another one.

That said, this timeout may or may not be under revision. Even if it is, 29 sec is the limit right now.

답변함 3년 전
  • Can we petition AWS to increase the API gateway timeout limit of 29 seconds? I have been searching for days a solution using my server less architecture and its just post after post after post about people running into the same issue of needing to find a work around for this limit of 29 seconds. Having to rebuild the architecture or doing some work around using more AWS services shouldn't be a justified answer. If a user has to wait then a user has to wait, the user has no idea if they are waiting for the ALB response or the API Gateway response. Let the engineers manage the timeout/errors.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인