[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

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

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

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

관련 콘텐츠