Can/will AWS API Gateway -> Lambda performance be improved?

前端 未结 1 1953
有刺的猬
有刺的猬 2021-02-15 13:53

Has anyone found a solution to API Gateway latency issues?

With a simple function testing API Gateway -> Lambda interaction, I regularly see cold starts in the 2.5s rang

相关标签:
1条回答
  • 2021-02-15 14:05

    engineer with the API Gateway team here.

    You said you've read "everything", but for context for others I want to link to a number of threads on our forums where I've documented publicly where a lot of this perceived latency when executing a single API call comes from:

    • Forum Post 1
    • Forum Post 2

    In general, as you increase your call rates, your average latency will shrink as connection reuse mechanisms between your clients and CloudFront as well as between CloudFront and API Gateway can be leveraged. Additionally, a higher call rate will ensure your Lambda is "warm" and ready to serve requests.

    That being said, we are painfully aware that we are not meeting the performance bar for a lot of our customers and are making strides towards improving this:

    • The Lambda team is constantly working on improving cold start times as well as attempting to remove them for functions that are seeing continuous load.

    • On API Gateway, we are currently in the process of rolling out improved connection reuse between CloudFront and API Gateway, where customers will be able to benefit from connections established via other APIs. This should mean that the percentage of requests that need to do a full TLS handshake between CloudFront and API Gateway should be reduced.

    0 讨论(0)
提交回复
热议问题