[API Gateway] Why is the actual response time so large

0

Hi everyone, I just have a test by setting up API Gateway + Lambda to check the response time. After finished i found a strange point after using X-Ray to trace the response time of API

My curious is:

1/ Why the response time so different ?

2/ How can i decrease the response time of browser or postman under 100ms even just with very simple testing infrastructure (AGW + Lambda) ?

p/s: i've enable API Gateway caching and thanks for your time

  • The photos below of X-Ray

Response time : 6~8ms Enter image description here Enter image description here

  • The photos below of Browser & Postman

Response time: ~ 200ms Enter image description here Enter image description here

1回答
0
承認された回答

I am guessing that what you are seeing is a Lambda cold start, i.e., you are invoking the function for the first time after some idle time. To verify, go to the Lambda logs and check if re REPORT line includes "Initialization Duration".

profile pictureAWS
エキスパート
Uri
回答済み 2年前
  • Hi Uri, i found my problem. It's because of my region & network issues. Thanks for replying

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ