I am currently using AWS Lambda for my internal application to application calls using spring framework implemented with jrestless.
Application to application call is working perfect with decent latency(~10-15ms ideally)
But when I am trying to leverage same lambda function via API Gateway the latency shoots up to 700-800 ms. Even though my lambda function is taking same 10-15 ms.
Lambda Function Configurations:
VPC: open(no vpc)
Region: ap-south-1(Mumbai)
Memory: 1500 MB(Highest)
Timeout: 5 min(Highest)
API Gateway Configurations:
Region: ap-south-a(Mumbai)
Request Integration: proxy+
Request Method: ANY
No Authentication is being used and its an HTTPS call.
Has anyone faced a similar issue?
I also have faced latency issues with api gateway but I don't have exact figures on that. However as of now by design api gateway has a latency issue and it's an ongoing.
https://forums.aws.amazon.com/thread.jspa?threadID=225458
According to the engineers I think 700ms is bit more high.
Just in case there is another concern with lambda as hot start and cold start. when you first call lambda latency is bit high. And there are couple of workarounds to overcome this as mentioned in the following blog post
Latency
and IntegrationLatency
. Latency
is the total server-side latency recorded by API Gateway, and IntegrationLatency
is only the latency of the backend request/response. The difference between these two metrics is the API Gateway server-side overhead. Any difference between client-side latency and the Latency
metric will be network/TLS/connection latency. duration
exposed by Lambda is only the function duration that you are billed for. It does not indicate the total latency.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.